Search This Blog

Sunday 14 March 2010

Ubuntu and Windows Apps

Son has two requirements from PC that are met by Windows on the dual boot, but not Ubuntu. So is there a way to get them working on Ubuntu?

The two are iTunes and MSN Messenger with webcam (his is a Logitech Webcam Messenger).

Let's tackle iTunes first. The need for this is driven by the recent acquisition of an iPod Touch and therefore music management comes in.

Installing iTunes under WINE has just proven to be a nightmare. Either wrong version of iTunes, wrong version of WINE, need to amend WINE code, etc.

Next option, therefore, is a virtual machine, and Sun's Virtual Box looks the solution.

A Synaptic install followed. Nice and easy.

Next stage is to install Win XP. Dig out that disk, yep that worked!

Hmm - could I get away with not installing SP2 and just install iTunes now? No! iTunes requires SP2.

Ah well. SP2 disk first of all decides to give the wonderful "Cyclic Redundancy Check" message - how much I love that one!

Whip the disk out, give a quick clean - replace in drive - and it works.

Good news - the Win VM sees the outside world! Bad news, that means we still can't do anything, as there are now umpteen updates to install.

Umpteen updates later, still a need to put in some AV software (Avast!) and some anti malware. Then update those.

Finally, install iTunes and Messenger.

Sorted!

No, not really. It can't see the webcam. It can't see the iPod. Why would that be?

Quite simply, because I had installed the wrong version of Virtual Box - the OSE one. I needed the PUEL version, that includes USB support.

Now, the question was, does such a changeover mean the Win install is lost and I have to start all over? Thankfully, no, it doesn't.

sudo apt-get remove virtualbox-3.1
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
sudo aptitude install dkms
sudo /etc/init.d/vboxdrv setup
sudo apt-get install bum

VBox now installed, Win XP working. USB still not working properly. Also, mouse capture very distracting.

Next stage, therefore, to install Guest Additions.

This allows mouse movement between the VM and Ubuntu. And now I can see mention of USB devices, but they still don't want to work!

So I followed these steps:

For Karmic

From a terminal run the following command:
  1. Add yourself to the vboxusers group if not already there: -
    if [ "`grep vboxusers /etc/group|grep $USER`" == "" ] ; then sudo usermod -G vboxusers -a $USER ; fi

This works for Karmic 9.10 Host and Windows XP Guest

From a terminal run the following command:
  1. This will check for your vbox user id which you'll need for the next steps. This will display a line that looks a bit like this: vboxusers:x:123:myself 123 is the user id of your machine you're looking for
    grep vbox /etc/group 
  2. This will edit your FSTAB File
    sudo gedit /etc/fstab
  3. Add the following line to the bottom of the fstab file: Replace userid with the number displayed from step 1.
    none /proc/bus/usb usbfs devgid=userid,devmode=664 0 0 
    • Example: none /proc/bus/usb usbfs devig=123,devmod=664 0 0
  4. Reboot Ubuntu 9.10
  5. Once logged into Ubuntu 9.10 start VirtualBox (Don't power on a guest OS yet)
  6. Click Settings from the VirtualBox main page for the Windows XP Guest OS
  7. Click the System tab on the left side of screen
    1. Enable IO APIC is needs to be selected
  8. Click the USB tab on the left side of screen
    1. Enable USB Controller and Enable USB 2.0 (EHCI) Controller need to be selected
    2. Your USB device should be recognized and ticked in the lower screen. If not, press the 'add' button (to the far right, 2nd one with the green cross) and add it.
  9. Power on your Guest OS and USB Should work
Net result? iPod now working, seen as a connected device.

What's more, the VM is "seeing" the Windows partition on the PC where the music files are held and these are copied into the iTunes Library, and the iTunes Library is "seeing" others in the house.

But what of the webcam? Well, a whole new odyssey commences there. One currently without solution - investigating options like emesene in Ubuntu or MSN in Win XP, with no joy at all so far...