June 12, 2008

Sync an ipod with iTunes on a linux computer!

Back in March there was some excitement when one of the WINE developers got an ipod to be recognized by iTunes running on linux with WINE. He posted his patch, but it has yet to migrate to the binary releases. So, unless you fancy patching and compiling WINE on your own, iTunes with WINE is not a great option.

I learned about VirtualBox about the same time, and it occurred to me that I could have a small Windows XP guest OS running on top of my Ubuntu install.

I installed the PUEL (non-free) version from Sun and followed the standard installation procedure. After applying a ton of XP patches, so that I could get to the point where I could use the guest XP install, I was able to download and install iTunes. I followed the instructions on the ubuntu site to get USB to work so the ipod was recognized. Here's a screenshot:

I wanted the ability to share folders between the guest and host OS and after a bit of struggling was able to get that to work (see note below). The bonus of getting the folder sharing to work was that I had to enable mouse sharing, which allowed for the "windowed" mode that you see in the screenshot.

I know that this is not the "free as in speech" way to use an ipod, but I also have a Nike+ that I would like to sync with the runnerplus website on a more regular basis. It was starting to be a pain booting into Windows to sync the ipod to have my stats saved to the website. Also, I have yet to find a linux tool that handles smart playlists of podcasts correctly. So far, this option seems to be the closest to what I've been looking for. And, I haven't seen anyone else do this in linux, that I know of. :)

Some notes:
  1. USB permissions are not persistent after reboot. Further, you need to set the permissions AFTER plugging in the ipod.
  2. The linux host can grab control of the sound card making the XP guest unable to play music. One way to fix this is to shutdown the program in linux that grabbed control of the sound card (if you don't need to use it) and restart the XP guest.
  3. Installing Guest Additions seems to be critical for folder sharing! (Some people have posted that it is optional.) In my case, I had to install it TWICE to get the folder sharing to work. (There are other people who report similar behavior.


Anonymous said...

Hey Drew.

I've been on the hunt to get iTunes to run under WINE as well. I've got the latest Ubuntu Hardy Heron and just today upgraded to WINE 1.1.0.

I'm still baffled by the usb support thought. I get some great results about a usb memory stick that is also a wine stopper, but I don't find how to get USB to work with WINE.

You mention something about an Ubuntu site that had instructions... can you point me in that direction?


Andrew said...

I was referring to the instructions at the bottom of this page:


where it describes getting USB to work with VirtualBox, but not with WINE, unfortunately.

Best of luck!

Anonymous said...

This is awesome (though i have not checked it out yet)!! The big holdup of me adopting linux has been the ability to work with itunes as i'm a big Nike+ user for runs through my ipod AND i have an iphone that syncs up with my outlook calendar from work.
I will adopt soon hopefully and get this to work for me. Thank you.

slowpoison said...

Any updates on this? It's almost been a year!

Andrew said...

I probably should do an update. The short answer is that the newer versions of VirtualBox make setting up the sync MUCH easier. I don't know any more about iTunes running with WINE and if the sync has improved or not.

What has your experience been?