How to Run iTunes in Ubuntu (with VMware Server 2)
Running Apple iTunes is still a dream of many Ubuntu users, particularly new starters who want a system that is as accessible and easy to use as the Windows or Mac systems they've come from. The native Ubuntu competition just isn't up to the job - Rhythmbox is underfeatured and looks dated, Songbird has enormous potential but is painfully slow and heavy on system resources (and still doesn't do a true sync to an iPod), Amarok and Banshee don't do a true sync either, and most of the competition is underdeveloped and buggy.
Unfortunately, the only working solution right now to get true iTunes functionality and manage your iPod is to run a Windows virtual machine on your Ubuntu desktop and run iTunes over that. Fortunately this is now relatively straightforward. Here's how you do it:
This is tested with Ubuntu 8.10, but it should work with other near versions just fine. Let me know if you have any problems via the comments.
All this is done with free software, except that you will need a Windows (ideally XP) disc or image. Of course, that doesn't necessarily have to cost you either, but I'm not making any recommendations on how to obtain it.
1. Download VMware server 2 from the website.
You'll have to fill in some basic details to get the free licence. When you get to the download page, find the listing for "VMware Server 2 for Linux Systems" and click to download the TAR image. The other way to go is to download the RPM image and use alien to convert it into a Ubuntu-friendly DEB, but I've found this unreliable in the past and can break your packages.
2. When you've downloaded the TAR image, browse to the directory it's in, right-click on it and select "Unpack here". It'll create a new directory. Note the name.
3. Open a terminal from the Accessories menu, and type in the following:
The installer will prompt you with a whole bunch of questions. Unless you're planning to use VMware Server for other Windows applications, just hit enter for each one to take the defaults.
4. When you run VMware Server, it will require you to login using the root username and password. On Ubuntu, this is disabled by default, so you'll have to activate it. From the terminal:
When it prompts you for a password, enter your user password. Now it will prompt you twice for a new password - this will be your root password.
5. In order for VMware to recognise your iPod, you'll need to make a change to the Ubuntu USB system. VMware relies on a setting that has been made obsolete in newer versions of Ubuntu - fortunately it can be re-enabled without any harm to your system.
In the terminal, type:
When the text editor comes up, add the following line to the bottom of the file:
Then save and exit. Back in the terminal, type:
This will make Ubuntu re-read the fstab file and mount the USB filesystem. It'll do this automatically when you start up from now on.
6. Open Firefox, and type into the address bar:
This will take you to the VMware Server interface. It'll prompt you for a username and password. For username type "root" (all lowercase) and for password use the new root password you set up in step 4.
You should now be seeing the VMware Server interface screen. It's time to create your virtual machine.
7. First you will need to add a Datastore. This is just a directory in which your virtual machine will store its files and find images to mount. Most files you are going to access from your virtual machine must be in a datastore. You'll need at least three or four gigabytes of space in this directory.
Click on "Add Datastore" in the Commands menu on the righthand side, give it a Name (this is just for your own reference) then type in the full path to the directory you want it to use. Hit OK and you're done.
8. Now select Create Virtual Machine from the same Commands menu, and follow through the wizard. Take the default values until you get to Hard Disk. You'll need to create a new virtual hard disk in the datastore you selected. Make it as big as you can, up to the capacity of the disk it's located on - because of the way VMware Server allocates space, it will only take up as much space on your real disk drive as the amount of data that's put into it.
Follow on through the instructions to attach a Network Adaptor (choose Bridged), CD and DVD drives. If you want to install Windows from an image file like an .iso, Add it at this stage too.
When you hit Finish, VMware Server will work for a minute and then you should see your new virtual machine appear in the Inventory panel on the left. Select it, and hit the green "play" icon. If you've done everything right, the panels should all light up and you'll see "Power On Virtual Machine" in the Task panel at the bototm, with a progress bar followed by a "Success" message.
9. Now you need to install Windows on your new virtual machine. Click on the "Console" at the top of the VMware interface page, and follow the prompts to install the Firefox VMware plugin. Once Firefox has restarted, go back to the Console and click anywhere to open it. This is the window in which you will work with your new virtual machine.
If you've correctly attached your Windows installation disc or disc image, you should be seeing the normal Windows installation interface. Just follow the prompts as you would on a new installation, partitioning the whole of the available space.
10. Assuming you don't want to move your whole music collection onto your virtual machine, you're going to want a way for iTunes to access your music. The easiest way to do this is to Share it in Ubuntu by right-clicking on your music folder, selecting Properties then making your selections on the Sharing tab - Ubuntu will install the relevent packages if you don't have them. Make sure you tick the box to allow writing to the folder if you want iTunes to be able to download cover art, edit your tags etc.
Once your Windows virtual machine is installed and booted up, you can now connect to that folder through Windows' normal Network tools - the Windows virtual machine sees its host as just another computer on the network.
11. Download and install iTunes from Apple's website, and point it to your network folder to load up your music.
12. Plug in your iPod's USB cable. In order to get VMware Server to pass the connection on to Windows, you'll need to go to the VMware infrastructure page in Firefox where you did the original setup. You should see a purple USB icon in the bar at the top, next to the start and stop buttons. Click on it, and you'll get a drop down that says something like "iPod" with a tick button next to it - tick the box to load the iPod into the Windows virtual environment, and in a minute or two you'll see it installing in the Windows session. Now you're all set with your new iTunes installation!
If you have any problems with this process, or there's anything you don't understand, drop me a line in the comments and I'll help out if I can.
Return to top
Unfortunately, the only working solution right now to get true iTunes functionality and manage your iPod is to run a Windows virtual machine on your Ubuntu desktop and run iTunes over that. Fortunately this is now relatively straightforward. Here's how you do it:
This is tested with Ubuntu 8.10, but it should work with other near versions just fine. Let me know if you have any problems via the comments.
All this is done with free software, except that you will need a Windows (ideally XP) disc or image. Of course, that doesn't necessarily have to cost you either, but I'm not making any recommendations on how to obtain it.
1. Download VMware server 2 from the website.
You'll have to fill in some basic details to get the free licence. When you get to the download page, find the listing for "VMware Server 2 for Linux Systems" and click to download the TAR image. The other way to go is to download the RPM image and use alien to convert it into a Ubuntu-friendly DEB, but I've found this unreliable in the past and can break your packages.
2. When you've downloaded the TAR image, browse to the directory it's in, right-click on it and select "Unpack here". It'll create a new directory. Note the name.
3. Open a terminal from the Accessories menu, and type in the following:
cd /the/directory/that/unpacked/from/the/tar/
./install
./install
The installer will prompt you with a whole bunch of questions. Unless you're planning to use VMware Server for other Windows applications, just hit enter for each one to take the defaults.
4. When you run VMware Server, it will require you to login using the root username and password. On Ubuntu, this is disabled by default, so you'll have to activate it. From the terminal:
sudo passwd
When it prompts you for a password, enter your user password. Now it will prompt you twice for a new password - this will be your root password.
5. In order for VMware to recognise your iPod, you'll need to make a change to the Ubuntu USB system. VMware relies on a setting that has been made obsolete in newer versions of Ubuntu - fortunately it can be re-enabled without any harm to your system.
In the terminal, type:
sudo gedit /etc/fstab
When the text editor comes up, add the following line to the bottom of the file:
usbfs /proc/bus/usb usbfs auto 0 0
Then save and exit. Back in the terminal, type:
sudo mount -a
This will make Ubuntu re-read the fstab file and mount the USB filesystem. It'll do this automatically when you start up from now on.
6. Open Firefox, and type into the address bar:
127.0.0.1:8222
This will take you to the VMware Server interface. It'll prompt you for a username and password. For username type "root" (all lowercase) and for password use the new root password you set up in step 4.
You should now be seeing the VMware Server interface screen. It's time to create your virtual machine.
7. First you will need to add a Datastore. This is just a directory in which your virtual machine will store its files and find images to mount. Most files you are going to access from your virtual machine must be in a datastore. You'll need at least three or four gigabytes of space in this directory.
Click on "Add Datastore" in the Commands menu on the righthand side, give it a Name (this is just for your own reference) then type in the full path to the directory you want it to use. Hit OK and you're done.
8. Now select Create Virtual Machine from the same Commands menu, and follow through the wizard. Take the default values until you get to Hard Disk. You'll need to create a new virtual hard disk in the datastore you selected. Make it as big as you can, up to the capacity of the disk it's located on - because of the way VMware Server allocates space, it will only take up as much space on your real disk drive as the amount of data that's put into it.
Follow on through the instructions to attach a Network Adaptor (choose Bridged), CD and DVD drives. If you want to install Windows from an image file like an .iso, Add it at this stage too.
When you hit Finish, VMware Server will work for a minute and then you should see your new virtual machine appear in the Inventory panel on the left. Select it, and hit the green "play" icon. If you've done everything right, the panels should all light up and you'll see "Power On Virtual Machine" in the Task panel at the bototm, with a progress bar followed by a "Success" message.
9. Now you need to install Windows on your new virtual machine. Click on the "Console" at the top of the VMware interface page, and follow the prompts to install the Firefox VMware plugin. Once Firefox has restarted, go back to the Console and click anywhere to open it. This is the window in which you will work with your new virtual machine.
If you've correctly attached your Windows installation disc or disc image, you should be seeing the normal Windows installation interface. Just follow the prompts as you would on a new installation, partitioning the whole of the available space.
10. Assuming you don't want to move your whole music collection onto your virtual machine, you're going to want a way for iTunes to access your music. The easiest way to do this is to Share it in Ubuntu by right-clicking on your music folder, selecting Properties then making your selections on the Sharing tab - Ubuntu will install the relevent packages if you don't have them. Make sure you tick the box to allow writing to the folder if you want iTunes to be able to download cover art, edit your tags etc.
Once your Windows virtual machine is installed and booted up, you can now connect to that folder through Windows' normal Network tools - the Windows virtual machine sees its host as just another computer on the network.
11. Download and install iTunes from Apple's website, and point it to your network folder to load up your music.
12. Plug in your iPod's USB cable. In order to get VMware Server to pass the connection on to Windows, you'll need to go to the VMware infrastructure page in Firefox where you did the original setup. You should see a purple USB icon in the bar at the top, next to the start and stop buttons. Click on it, and you'll get a drop down that says something like "iPod" with a tick button next to it - tick the box to load the iPod into the Windows virtual environment, and in a minute or two you'll see it installing in the Windows session. Now you're all set with your new iTunes installation!
If you have any problems with this process, or there's anything you don't understand, drop me a line in the comments and I'll help out if I can.
Labels: how to, Installation, IPod, ITunes, itunes in ubuntu, Microsoft Windows, Ubuntu, usb, virtual machine, VMware, VMware Server, vmware server 2, Windows







2 Comments:
Hey mark.. i was able to get itunes up and running on VM.. although i was not able to see my iPhone connected to itunes.. at the moment my only solution is to run ubuntu side by side. (and i prefer to run solely ubuntu) your instructions were great, now i hope you can help me with my remaining issues..
eddy (at) samspcworld (dot) com
or
eric (at) samspcworld (dot) com
25 April 2009 23:23
Hi Eddy. In step 12, were you able to see your iPhone listed in the dropdown on the VMware Infrastructure page?
26 April 2009 17:00
Post a Comment
<< Home