Tombuntu

Wirelessly Sync an iPhone or iPod Touch with Ubuntu

Apple has made it as difficult as they could to sync the iPod Touch and iPhone to any application other than iTunes. As a result, syncing an iPod Touch or iPhone in Linux is still no easy task.

The way it works right now, Linux needs to get access to the iPod’s iTunes database via an SSH server over a wireless connection. The USB protocol is encrypted and has not yet been hacked.

For this guide, I’d recommend some experience with the command line, SSH, and your jailbroken iPod.

Setting up the iPod

  1. Your iPod must be jailbroken and running an SSH server. Use Installer.app to install OpenSSH and the BSD Subsystem.
  2. You don’t want your iPod go to sleep while it is connected. You can prevent this by turning auto-lock to never in the settings application.
  3. Find your iPod’s IP address. Connect to your wireless network, open Settings->Wi-Fi, and tap the blue arrow to open the network details. Note the IP address field.
  4. If your IP changes a lot, you’ll want to set up a static one because you need the iPod’s IP to sync with Linux.

Installing Software on Ubuntu

  1. All of the software you need is in the Ubuntu 8.04 repositories. If you’re using 7.10, there’s a repository available with the software:

    http://ppa.launchpad.net/ipod-touch/ubuntu gutsy main
    
  2. Install gtkpod from the gtkpod-aac package, which is compiled with support for AAC audio.

    sudo apt-get install gtkpod-aac
    
  3. Install iPod Convenience, a script that automates mounting and unmounting the newest iPods:

    sudo apt-get install ipod-convenience
    
  4. During the install of iPod Convenience, you will be prompted for your device’s IP address and a mount point. Use the iPod’s IP address you noted earlier, and use the default mount point.

Syncing

  1. The first time you sync, you need to have the iPod plugged in via USB to get around some of Apple’s protections on the iTunes database.

  2. Use iPod Convenience to mount the iPod by running the command below appropriate for your device:

    ipod-touch-mount
    iphone-mount
    
  3. Hopefully, you will be prompted twice for your iPod’s password. (The default is “alpine”.) Then Ubuntu should recognize the iPod. If this fails, check that you can ping and SSH to your iPod’s IP address.

  4. Now you can start gtkpod, which should see that there is an iPod plugged in and prompt you for the model. If gtkpod asks to create the directory structure, the iPod is likely to be not properly mounted.

  5. You should now be able to sync using gtkpod!

  6. When you are finished, close gtkpod. Use iPod convenience to unmount the iPod by running the command below appropriate for your device:

    ipod-touch-umount
    iphone-umount
    
  7. You will be prompted for your iPod’s password again. The iPod should then be unmounted.

  8. If your changes are not showing on the iPod, SpringBoard needs to be restarted. You can do this using the SMBPrefs (SummerBoard) application’s restart SpringBoard button, or by rebooting.

Using gtkpod

SSH Keys

Noticed that this involves a lot of typing your iPod’s password? You can use SSH public keys for a passwordless login. I’ve written a post about this before, and there’s more information on the Community Ubuntu Documentation page. I haven’t tried this with my iPod yet.

If you’re stuck, there’s more documentation available. Leave a comment if you get your iPod working or have a problem.

Archived Comments

visu

Hi, nice guide, it will definitely be useful if I get my iPhone in a few weeks.

Btw, I use Avidemux for converting video, but never tried to rip a DVD. Maybe you should give it a try ;)

So long, keep it up!

Ryan Prior

So not worth it! Apple makes it hard for Free Software users to use their products - so screw them! If you like Free Software, you should hate Apple and everything they stand for. Vote for your dollars and buy from somebody who cares!

dave

seems to be you have just copied from here http://www.ubuntugeek.com/howto-sync-wireless-iphone-with-amarok.html give them credit tom

Tom

Ryan Prior:
You’re right, Apple’s certainly not encouraging me to buy more of their products by making them more locked down.

dave:
Nope, I haven’t been copying from the Ubuntu Geek article, the similarities probably come from the community documentation page that I linked to at the end of my post.

Stefan

Hey, I just stumbled upon your post.
You might want to add the possibility of syncing ubuntu and iphone in more ways:

iphone-sync to sync with tomboy (a little program I have written, mainly works): https://launchpad.net/iphone-sync
and funambol/syncevolution: http://www.estamos.de/blog/category/iphone/

The first solution might go into conduit in the future though.

daveola

I’ve written a command-line script that lets you copy photos to the iPhone so they show up in “Camera” and “Photo” apps, you can check it out at:

http://MarginalHacks.com/#img2iphone

(It’s free to use.)

Anonymous

I keep getting “Connection refused.” What can I do?

Fahd

Guys after installing ipod-convenience, it says that i should get a prompt asking for my phones IP address…The thing is, i dont get that prompt :S any idea’s on what i should do?

john

Does this work for 2g itouch???
I mean can you ipod-touch-mount a 2itouh.
I tried doing so and I got gtkpod to recognize the ipod, and it was copying tracks. After it synced it said ipod firmware not found. The tracks did not show up in the ipod.

Thanks for the help

frank

Hi,
almost the same over here. I tried it with the iPod touch 2G. Everything works fine, mounting, adding tracks with gtkpod. But after unmounting I can’t find the songs on my iPod. gtkpod sees them, sync seems to go fine.

Any suggestions? Thanks in advance!

charles

I got things working on my ipod touch 2g. I am using firmware 2.2.1 because I am worried that the ipod might crash sometime when I am traveling, and I wont have a computer around to re-jailbreak it. Jailbreaking was not so hard, but figuring out how was a bother, and I’d rather not be bothered again.

Once you have songs on the ipod via any of the above methods, the database has to actually pick them up. The database seems to be sorted or whatever at startup, so I just restart my ipod and viola, I can play the songs. I have heard something about respringing or a springboard application or something, google those terms if you are using a newer firmware that is still tethered-only jailbreak.

Anonymous

Hey! Is it in any way possible for a 3rd generation iphone to be synced with linux? Via cable does not work on my computer (after ages of trying…) so i was thinking maybe wireless would? Also everything ive read up to now says jailbreak is nessecary… is that true, cuz im not too keen on that!

charles

Thanks for writing the guide tom, it helped me.

Hey if you are having trouble with an ubuntu package like this Fahd fellow is, where it is configured wrong or unconfigured, you can use the dpkg-reconfigure command. I think you might want to put a sudo in front of it, and the name of the package after it.
e.g.
sudo dpkg-reconfigure ipod-convenience

and hopefully you can set configuration values that ought to be set when the package is being installed. google the dpkg-reconfigure command if you are still curious. good luck all.

Bruce Wagner

See the very bottom of this page: https://help.ubuntu.com/community/PortableDevices/iPhone

Alternative Options

There are other ways to achieve similar results without the need to “jailbreak” the iPhone, and without any modifications to your systems. One way is to simply use the web browser of the iPhone, or other device, in conjunction with sophisticated new web-based services.

For one example of this, see the How To article entitled, “How to Wirelessly Synch an iPhone / iPod Touch / Android to Ubuntu / Mac / Windows / Any Browser”: http://brucewagner.posterous.com/how-to-wirelessly-synch-an-iphone-ipod-touch

Taranfx

In case you wish to do it through wire, You might check this one: http://www.taranfx.com/sync-iphone-linux (Works on Ubuntu 9.1)

Mica Schlarb

Thanks for your be able to write up. I consider the stuff pointed out in your matter is in fact spot on. I’ve got been undertaking preliminary investigation relating to the topic and your piece has cleared up a number of uncertainties I had. I’m working on an dissertation aw effectively like a term piece for my English subject and am already browsing via a good deal of world wide web blogs to study. Also, loving the website layout. I had a similar blog to yours prior to I sold it on.

Kandi Majera

Thanks a ton for your time and efforts to have put this stuff together on your site. Betty and that i also very much appreciated your ideas through the articles about these crucial issues. I’m very conscious that you simply will have a number of calls for your time so the fact that a person like you took all of the time like you did to guide people for instance like us via this article is also highly valued. I wanted to subscribe to your RSS feed. But unfortunately it by no means appear being working for me. Am I the just one with this trouble? Iwill come back in a week or so to check. Anyways thank you a great deal yet again on your good read.

Respond via email