Archive for the ‘Windows?’ Category

Car-PC Project

Wednesday, December 14th, 2011

See this link for progress so far:

http://www.fullfatrr.com/forum/topic8786.html

HTML Auto Slideshow using Javascript and php with dynamically generated array of Images

Friday, October 14th, 2011

Another holy grail for me, to be able to just add images to a directory and have the slideshow automatically pick them up and display them withoput having to edit html /javascript code. Most scripts I had found for an html slideshow required the array created inside the script, this way you use php to generate the array and then the javascript runs with it. Only downside is you will need php up and running, but most web servers online have this by default now.

My blog is a bit broken at the moment so will have to link the files to Ubuntuforums

http://ubuntuforums.org/showpost.php?p=11339174&postcount=2

  1. Images will be shown at their actual size, so you may need to add some html code to the tag in the to restrict the images size.
  2. On your server, go to the place where you want the html file to be and upload the index.html file there, then create a sub-directory called pics and upload the getimages.php file to the pics directory.
  3. Next upload all your images to the pics directory.
  4. Done.

Acknowledgements to all the clever people who wrote the original scripts and files

Auto Web Page Changer using iframe

Monday, May 23rd, 2011

Oh I like this. In seeking to setup a rolling web browser display display at work, I came upon this small but very clever bit of javascript, which on a timer will change the web page being viewed inside an iframe. Just edit the defaults to you preferred pages and timings and away you go:

 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Changing Pages… Please Wait</title>
<script type=”text/javascript”>
var frames = Array(’http://www.google.com/’, 15,
‘http://www.yahoo.com/’, 15,
‘http://www.ask.com/’, 15,
‘http://www.dogpile.com/’, 15);
var i = 0, len = frames.length;
function ChangeSrc()
{
if (i >= len) { i = 0; } // start over
document.getElementById(’frame’).src = frames[i++];
setTimeout(’ChangeSrc()’, (frames[i++]*1000));
}
window.onload = ChangeSrc;
</script>
</head>
<body>
<iframe src=”" name=”frame” id=”frame” width=”100%” height=”100%”></iframe>
</body>
</html>

I had to put a fixed height in there as 100% wasn’t giving 100% just 10% at the top of the page. This script repeats adinfinitum. If you only want it to run once, use this one:

 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Changing Pages… Please Wait</title>
<script type=”text/javascript”>
var frames = Array(’http://www.google.com/’, 15,
‘http://yahoo.com/’, 15,
‘http://www.ask.com/’, 15,
‘http://dogpile.com/’);
var i = 0, len = frames.length;
function ChangeSrc()
{
document.getElementById(’frame’).src = frames[i++];
if (i >= len) return; // no more changing
setTimeout(’ChangeSrc()’, (frames[i++]*1000));
}
window.onload = ChangeSrc;
</script>
</head>
<body>
<iframe src=”" name=”frame” id=”frame” width=”100%” height=”100%”></iframe>
</body>
</html>

and it gets better! Now the next set of code does the rolling web pages, with no border on the iframe, no scrollbar on the iframe, and with a fix for full height and width in Firefox:

 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Changing Pages… Please Wait</title>
<style type=”text/css”>
html, body, div, iframe { margin:0; padding:0; height:100%; }
iframe { display:block; width:100%; border:none; }
</style>
<script type=”text/javascript”>
var frames = Array(’http://www.google.com/’, 15,
‘http://www.yahoo.com/’, 37,
‘http://www.ask.com/’, 12,
‘http://www.dogpile.com/’, 14);
var i = 0, len = frames.length;
function ChangeSrc()
{
if (i >= len) { i = 0; } // start over
document.getElementById(’frame’).src = frames[i++];
setTimeout(’ChangeSrc()’, (frames[i++]*1000));
}
window.onload = ChangeSrc;
</script>
</head>
<body>
<div>
<iframe src=”" name=”frame” id=”frame” width=”100%” height=”100%” border=”0″ scrolling=”no”></iframe>
</div>
</body>
</html>

XP - Missing User Profile

Monday, May 23rd, 2011

A rare fix for a problem on XP suffered by my father following a twofold issue of full C:/ drive and a powercut! When he restarted the PC it appeared that he had lost everything, and just booted up to a new plain and empty profile.

So first off I cleared out some cruft using C-cleaner and got 1GB of space back, then moved a load of installation files to some redundant space on the PC and got back another 500mb.

Then to restore his profile I headed into: My Computer (right click) > Properties > Advanced tab > User Settings. This brings up a dialog listing the user profiles available on the PC. I identified his original profile which had been labelled back up and the new profile that had been created when he restarted. Tried to delete this new profile but couldn’t. So into Control Panel > Users and created a new user with Admin rights. Logged out, logged into the new user and went to user profiles and deleted the new profile for his main system. Logged out and logged back into the main user and thankfully his profile returned. Then deleted the newly created user account.

All done :)

Fix Windows 7 when stuck at “Starting Windows”

Tuesday, June 8th, 2010

OK, I dual boot W7 Home Premium and Xubuntu 10.04. I also like to try out various live cds, boot cds and so on.

Every now and then, when I boot to W7, it gets stuck at the “Starting Windows” splash screen, pretty glowing colours but thats it. If I start up in safe mode it gets as far as classpnp.sys and then just hangs.

So I boot back into Xubuntu and open up Gparted; to find that the W7 partition has become hidden (this is probably my fault for fiddling about :))

To fix, unmount W7 partition, and then Manage Flags and untick the “hidden” flag, then reboot into W7.

If you are not dual booting, you can use any Ubuntu Live CD or Parted-Magic Live CD, or there are paid for Live CDs that will do a similar thing.

There is another method if this doesn’t work (or “hidden”) isn’t the problem.

1. Boot windows but press F8 to get up the recovery menu, and choose “Repair Windows

2. Login in as an Administrator (your own account will do if that type of account)

3. You eventually get some menu choices, pick Command Prompt

4. Type dism /online/get-packages
(If that doesn’t work try dism image:c: /get-packages)

5. You should get a list of the updates installed. Find the most recent one and write down the full filename

Filenames look something like this:
WUClient-SelfUpdate-Core-opLevel~31bf3856ad35~x86~~7.4.7600.226

6. Then run: dism /online/remove-package /PackageName:nameof package
(Again, if that doesn’t work, try dism /image:c:/remove-package /PackageName:name of package

7. Reboot PC

8. If you still have a problem, perform this procedure again, removing the latest package, until you find the one that causes the problem

Am I Open Source or What? (on a Windows 7 PC ?)

Thursday, March 11th, 2010

It’s list time again:

Because so much good open source software has been ported to Windows, its possible to do just about everything on Windows with the open source programs I use regularly on my main Xubuntu 9.10 system:

Open Source:

Open Office
Abiword
Gnumeric (a bit buggy)
Gimp
Inkscape
Gwhere
Geany
Audacity
ProjectX (java)
HJSplit (java)
Frostwire (java)
VirtualBox
FireFTP (firefox extension)
Firefox (of course!)
Mplayer & SMplayer
VLC

This list will grow. Keep up the good work guys :)

Plus, some notable “freeware” applications:

PhotoFiltre
ProgDVB6
puTTY
ImgBurn
AVGFree 9
Shark007 Codecs Pack
UltraVNC
VNCViewer
Windows Movie Maker 2.6
CPUz
JellyBean Key Finder
WirelessKeyView
Google Chrome
CCleaner
DeFraggler (Piritin)
Free Screen To Video (Koyote Software)
Winamp (with iAmp skin)
WizMouse (scroll without focus)
Powerpoint Presentation Viewer
RocketDock (just like my wbar!)
CDex
Adobe Reader 9
Scanner Application that comes with my Brother Network Printer (Brother very good at drivers and support for Windows and Linux)

[EDIT 12/2010 add DVD Flick to your list of freewares, encodes / authors / burns ]

Shareware I just can’t live without:

Winrar

[EDIT 12/2010 - now found I can, try Izarc, copes with just about everything ]

Hacks:

Also done a few registry hacks to sort out the awful unintuitive default behaviour of Windows Explorer. These are easily found on any Windows 7 sites.

Remove Libraries from Explorer
Remove Favourites from Explorer
Remove HomeGroups from Explorer
Adding Directories “I want” to the SendTo drop down
Removing “Drives” from SendTo
Adding Copy To folder and Move To Folder to Right Click
Adding Open Command Prompt to Right Click

Nearly got my Windows PC behaving and looking just like “Linux”  :D

Windows 7 & Xubuntu (Dual Boot) & Samba File Server: Do’s and Dont’s

Thursday, March 11th, 2010

Been dual booting W7 and Ubuntu for some time using the RC version, but upon purchasing an Asus EB1012, which is now proudly bolted out of sight to the back of my 24″ Hanns.G screen, I found I had a proper licensed copy of W7 Home Premium to look after, alongside side my 9.10 Xubuntu install. With a linux samba server also on the Lan I needed everything to run smoothly, and after fiddling about for a few weeks, I believe I am finally there.

DO:

1. Dual boot W7 with Linux. It makes so much sense, as what you can do in Linux is what you can’t do in W7, and vice versa (although the latter has now almost dimished to zero :))

Setting Up for Samba Server File Access

2. The following to get your samba server working with W7 to stop it BSODing:

edit your /etc/samba/smb.conf on the server and ensure that:

  • Your workgroup name is listed
  • Your netbios name is listed, and is the same as your workgroup (OK, this means you can only have one samba server, but it helps
  • Ensure that your security entry is set to user

So in the [global] section of smb.conf you should have these entries (assumes workgroup of MYHOME)

workgroup = MYHOME
netbios name = MYHOME
security = user

3. Follow all the steps in this howto by stormbringer on ubuntuforums to setup your samba server and shares.

4. Follow all the steps for W7 in this howto by dmizer on ubuntuforums to setup W7 for samba access

5. Add a registry key to W7 for LmCompatibilityLevel=2 - see here

6. Make sure your W7 workgroup matches the one in your smb.conf file

7. Have a look at your Antivirus program. Crashes have bee experienced when using free versions of Avast, Avira and AVG. I have AVG 9 Free installed and have disabled the Resident Shield and Link Scanner (the latter of these is apparently the root cause). If this doesn’t fix things, uninstall your AV all together.

8. Add your linux file server to your lmhosts.sam file in Windows 7. You will need to open notepad as administrator to do this. Simply add the ip, followed by a space or tab, followed by the netbios name you chose:

192.168.0.100   MYHOME

Save and reboot to get it to take effect.

Sharing Files on the Dual Boot

9. Create an NTFS shared partition separate from Ubuntu or Windows. If you don’t have the space, keep your files on the windows partition somewhere. ntfs file access is facile under ubuntu and you can automount through fstab with a simple line like this:

UUID=05AAD3F54R0B9BDA                           /media/DATA     ntfs-3g defaults 0 0

And of course you would use a similar line for accessing the windows partition.

At the moment, you won’t easily be able to access your Ubuntu partition from windows, well, not with read/write access, but to get at least read access, you would need to do some work prior to installation. I’m not going to recommend this route, as I believe it leads to instability. So you will need to be strong, and always copy or move files to your shared partition when in ubuntu. If you really must have read access, look here

DON’T:

1. Try to use Ext2ifs or Ext2fsd to access your ext4 partition. It doesn’t work, (bar the workaround above) and can cause your W7 to crash.

2. Don’t use EXT3 as your file system for a shared partition. Although it “works”, its just asking for trouble, because you will need to run one of the two programs in 1. above, which can increase instability.

3. Use Samba as your file server when on the ubuntu side of the dual boot. Setup NFS on the server for linux file access. Much better.

As you can probably see, I have set out to keep things as native as possible; give W7 what it expects to find and it will work well, give Ubuntu what it expects to find and the same applies….

Observation, after a recent Windows update, or due to something unrelated to all the above, my Server disappeared from the Network section, so have found the need to create a persistent mapped network drive. Wonder if it will ever come back….? [EDIT] it did, following a cold reboot the next day.

Firefox 3.5.7 Update killed / crashed / broke Firefox on Windows 7

Sunday, January 31st, 2010

This is more of a news bulletin than anything else.

My new PC has Windows 7 by default, so I am playing with it every now and then when not booting into Xubuntu 9.10. Yesterday Firefox went after an update for itself, from 3.5.6 to 3.5.7. The update went OK, but then firefox flatly refused to start. Not even showing up in Processes or Applications in the Task Manager. A reboot didn’t help either.

The resolution was to download and install Firefox 3.6 (I tried to uninstall first but Windows Control Panel told me that Firefox was already uninstalled! (go figure). Anyway all working good now.

Run “wubi” from usb stick

Monday, December 28th, 2009

As we move away from “burnable” media to solid state, then need to be able to use distros on usb sticks becomes more important. I have never yet tried wubi, but with a new PC on the way (with no optical drive) and Windows 7 pre-installed, I am tempted to try wubi as my installation method (even if only for a while! :))

So using unetbootin I setup a 1GB usb stick with Ubuntu Karmic Koala 9.10, booted up into Windows 7 and put in the stick.

Hmmm… no autorun of wubi.exe?

So opt to open folder and double clicked on wubi.exe. Accept the UAT control dialog and the wubi menu pops up. But with one problem. No “Install inside Windows” option. Not much good then.

Google away and find out its a bug. How to fix is quite easy and just takes one more step.

Open up a command window (or go Start > Run)

Type:    X:\wubi.exe force-wubi

(where X is the drive letter of your usb stick)

and pass the UAT again and lo and behold,

your “Install inside Windows” option is there.

HOWEVER, wubi still seems to insist on downloading the distro from a torrent, as opposed to using the one you have on a stick. To overcome this, and if you have a big enough stick (!) copy the whole *.iso from your HDD onto the stick, into the same directory as wubi.exe. This will ensure you still have a bootable stick. Alternately, extract the wubi.exe from the iso, then with a blank formatted stick simply copy wubi.exe and *.iso onto the stick. Insert to a booted up Windows and go. You may nned to follow the initial instructions to get an install button, but I found with Xubuntu.9.10 I didn’t have too.

Grub Menu not Visible after attaching new widescreen Monitor! Solved!

Wednesday, November 18th, 2009

Was time to treat myself to an early Christmas present, so splashed out on the ridiculously cheap HannsG HH241 24″, 1980×1080 WUXGA monitor @ £140. Comes with a VGA-VGAcable abd a DVI-HDMI cable (monitor has an HDMI port)

Plugged it in, powered up.

Nvidia Geoforce 6200 Graphics card with DVI/VGA output
HannsG HH241 24″ widescreen 1980×1080 WUXGA, HDMI 1.3 compatible
Multibooting @ 5 OS’s

PC booted up fine with post/bios screen viewable, then a blank screen for a few seconds (where grub menu usually is, then usual starting up for Xubuntu 9.04 (the default OS in my grub menu (grub legacy)

Once X was running everything fine.

Tried all sorts, reinstalling grub to mbr, reconfiguring X, checked for settings in bios (none obvious), but nothing changed.

So switched to VGA-VGA cable, and grub menu was back. So I am kind of sorted, but wavy lines and distorted image during post and splash, and was getting a better picture and all round performance using the hdmi connection.

Previous monitor, an Iiyama 17″ LCD worked fine on a DVI-DVI cable.

Also, Xubuntu Progess screen during boot up was not centred, off to the right a bit.

After hours and hours and hours of googling, finally found a post about toshiba laptop owners not getting grub on a cold reboot. The recommendation was to install grub2
To install grub2 on Jaunty or below

sudo apt-get install grub2

Test it by loading grub2 as chainloader (this option is offered on installation)
You’ll need to “e” “e” and change root to uuid to get the chainloader to work

If you are happy run

sudo upgrade-from-grub-legacy

and grub2 will take over, And lo and behold, the grub menu is back! New things to learn in order to customise grub2 menu, and set up a splash image for it.  Xubuntu progress splash also nicely centred.

Best place to go for just about everything grub2 is here