Syncing your iPhone (or iTouch) with Linux

Jack Wallen
Dec 20, 2009
Updated • Nov 28, 2012
Linux
|
50

It's taken me long enough, but finally a solution for syncing both an iPhone and an iTouch with Linux is possible. What is best about this method, is that it does NOT require a jailbroken iPhone. That's right, you'll be able to sync your iPhone, via USB, and add all sorts of good music to it. Now therein lies the catch - all you will be able to sync is Music. No calendar or contacts (yet). But for those who just need to get their music onto their iDevices, you are in luck.

The process is a bit involved, but not too difficult. I will walk you through the steps, some of which are command based, and some are not. And without further adieu, let's get to the installation and configuration. NOTE: As with anything, use caution and ALWAYS back up your data. It is never guaranteed that you won't lose data. You've been warned. ;-)

The installation

There are numerous tools to install. I will be doing this on a Ubuntu 9.10 Desktop box, so you will have to adjust your steps according to your distribution.

The first thing to do is add a repository to your apt sources. Do this with the following command:

sudo add-apt-repository ppa:pmcenery/ppa

Now you need to update with the command:

sudo apt-get update

Once apt has completed the update issue the following to install the bulk of what is needed:

sudo apt-get install gvfs gvfs-backends gvfs-bin gvfs-fuse libgvfscommon0 ifuse libgpod-dev libgpod-common libiphone-utils libiphone0 python-iphone libplist++1 libplist-utils python-plist libusb-1.0-0 libusb-1.0-0-dev libusbmuxd1 usbmuxd

Quite a bit to install eh? And it's all necessary. Let that process complete.

Edit fuse.conf

The next step is to edit the /etc/fuse.conf file so that your user will have access to the gvfs file system. Do this by opening the /etc/fuse.conf file in your favorite editor and changing this line:

#user_allow_other

to:

user_allow_other

Save that file and you are ready to move on.

Fuse group

Now you have to add your user to the fuse group. To do this go the User and Group entry in the Administration sub-menu of the System menu. When this tool opens click on the Key button to unlock the tool for administrative purposes. Now click the Manage Groups button and then scroll down until you find the fuse group. Double click the fuse group and then click the check box next to the user you want to have access to the fuse group. Click OK and then close out all of the User and Group windows.

Log out

The next step requires that you log out of your desktop and then log back in. This will ensure that all changes have taken place. Once this happens plug in your iPhone (or iTouch) and see if it automounts to your desktop. There will be two devices mount. The first device will show up as a camera, the second as a phone. Once you see both of these, you know you are nearly done.

Gtkpod

Unfortunately there are some bugs in Rhythmbox that prevent the user from writing to the iPhone/iTouch. That's fine because there is always Gtkpod. You will need to install this with the command:

sudo apt-get install gtkpod

Once this is installed you will find the entry for it in the Sound &  Video sub-menu of the Applications menu. Fire that tool up and you are nearly complete.

Figure 1

The last thing you need to do is to configure Gtkpod to mount your device. In the Edit menu you will notice a Repository/iPod Options entry. You have to configure your device as a repository for Gtkpod.

As you can see (in Figure 1) you have to configure where the device will be mounted. This is where it might seem a bit more complicated than need be.

Because of having to use gvfs, the mount point will be in ~/.gvfs/ and will be listed as the name of your device. You will have to open up a terminal and change into that directory to find out what it is called. In my case it was ~/.gvfs/Jack Wallen. So I would enter that in iPod Mountpoint configuration section.

The next option to configure is the Model. Make sure you select the correct model. Do so by clicking the drop down and choosing your model from the list. Once you have done this, click the Add button to add your new device repository. You can then OK the Options window and you are ready to load your iPhone.

Back in the main Gtkpod window click the Load iPod(s) button and eventually your device will show up. You can now add music to your device! Make sure, when you are done adding music, to click the Save Changes button.

Final thoughts

It's taken long enough, but the ability to add music to an iPhone has finally arrived. The next step, hopefully, will be the syncing of apps and contact/calendar data. I have a feeling that's going to be another long wait.

Advertisement

Previous Post: «
Next Post: «

Comments

  1. Declan Woodham said on May 5, 2012 at 10:20 am
    Reply

    iTouch is a shortend name of the iPod Touch

  2. David Mader said on June 1, 2010 at 6:19 am
    Reply

    Is there some way to use this method on a OpenSUSE desktop? My iPhone 3Gs mounts on the Desktop but I’ve been unable to use “gtkpod” to copy files over. This is too hard!!!

  3. Anonymous said on May 2, 2010 at 5:54 pm
    Reply

    I am trying to do the install on Ubuntu 10.04 but cannot do tethering from my iphone to it. Otherwise, iphone and ubuntu connect and I can transfer my pictures to the PC.

    Also
    sudo add-apt-repository ppa:pmcenery/ppa
    gives:
    Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver keyserver.ubuntu.com –recv 3AE22276BF4F39C8D6117D7F4EA3A911D48B8E25
    gpg: requesting key D48B8E25 from hkp server keyserver.ubuntu.com
    gpgkeys: HTTP fetch error 7: couldn’t connect to host
    gpg: no valid OpenPGP data found.
    gpg: Total number processed: 0

  4. Neo said on March 12, 2010 at 7:22 pm
    Reply

    good TUT, my iPhone 2G (8G) worked good with rhythmbox and nautilus but gtkpod cannot load. Apear warning windows with two line: Extend info will not be used and ipod database import failed. I dont know where is problem, any help???

  5. Indy said on March 11, 2010 at 11:52 pm
    Reply

    It worked for me 2 had to follow Marks instructions on changing the packages and rebooting, and after plugging in the ipod touch again the 2 icons showed up.
    Very nice its my daughters device and I never work with it, so I took a look at (what I think) the software version on the Ipod Touch is and thats 2.2.1 and I’m using ubuntu 9.10
    I hated Itunes and I’m very happy with this, many thanks and keep up the good work

  6. Mark Withams said on March 8, 2010 at 11:50 pm
    Reply

    It worked for me, but I had to replace the libiphone-utils package with libimobiledevice-utils package and the python-iphone package with the python-imobiledevice package when doing the apt-get install. It also didn’t mount when I first plugged in my iPhone 3GS. However, I found that when I rebooted the machine with the phone plugged in, it automounted and continued to do so whenever I plugged it back in. Thanks for the excellent article – it’s great not to have to be chained to iTunes.

  7. ufuk said on February 5, 2010 at 7:25 am
    Reply

    Hey, i have done all that above

    sudo apt-get install gvfs gvfs-backends gvfs-bin gvfs-fuse libgvfscommon0 ifuse libgpod-dev libgpod-common libiphone-utils libiphone0 python-iphone libplist++1 libplist-utils python-plist libusb-1.0-0 libusb-1.0-0-dev libusbmuxd1 usbmuxd

    i installed all that above separately but i couldn’t install python-iphone -> couldn’t find package

    changed the fuse.conf and added me to the fuse group.
    logged me off and in again

    but now if i plug in my iphone 3gs nothing pops up at all. in the past the camera was recognized.. but now nothing…

    can anyone help me

    pls

  8. zackstur said on February 3, 2010 at 6:08 am
    Reply

    couldn’t get it to work. tried for several hours, but i got stuck at the gtkpod section. NOW, can you tell me how to undo all these changes that I made?

  9. Michael Weston said on January 26, 2010 at 3:16 am
    Reply

    FYI for anyone looking at trying this on Jaunty (9.04): The ifuse available as of this writing (0.9.4) in any PPA for Jaunty that I could find has libusbmux0 as a dependency, and this will conflict with libusbmuxd1, which is in the list of modules installed up in Step 3. If there’s a way to resolve this, or to get a later version of ifuse (0.9.6) installed onto Jaunty, I didn’t find it. But I’m still new to this and not yet up to dealing with the possible fallout of trying to compile from source. If it broke anything I’d be up the proverbial creek.

  10. Donny Bahama said on January 22, 2010 at 6:34 am
    Reply

    Like a few others, this didn’t quite work for me. My iPhone IS being recognized as a camera — and Picasa is automatically connecting and downloading photos. But nothing in gtkpod or rhythmbox.

    When I look in ~/.gvfs/ there’s nothing there. Any chance of a troubleshooting follow-up post since a number of us are having the same problem?

  11. Roadpat said on January 21, 2010 at 6:15 am
    Reply

    This works! You don’t have to use GTkPod as the RythmBox sees the iTouch right away. My iTouch had a funky name and I couldn’t get it to mount right in GTkPod so opened up RythmBox for the heck of it and everything was there. I’ve got a 2nd Gen 16Gb which has been upgraded with firmware 3.1.2 installed. You can also see the videos in RythmBox. Wonderful Job. Goodbye iTunes pain of syncing music. Ubuntu 9.10.

  12. Anon said on January 19, 2010 at 7:31 am
    Reply

    Followed instructions to the T, seemed to work alright, Phone was recognized asked me to initialize… but then after a few seconds my phone just showed the apple logo and everything was gone =\ Running jailbroken on 3.0.1 3g

  13. Anonymous said on January 11, 2010 at 6:27 pm
    Reply

    Tried this, everything seems to work perfectly, except when i add a song and press save changes. After that it crashes with the following code from terminal. Also im using a 3rd gen ipod touch, 32Gb

    ** (gtkpod:7966): CRITICAL **: itdb_splr_validate: assertion `at != ITDB_SPLAT_UNKNOWN’ failed
    libitdbprep: itdb_sqlite_generate_itdbs called with file /home/garry/.gvfs/bby.woO/iTunes_Control/iTunes/iTunesCDB and uuid (null)
    itlp directory=’/home/garry/.gvfs/bby.woO/iTunes_Control/iTunes/iTunes Library.itlp’
    *.itdb files will be stored in ‘/home/garry/.gvfs/bby.woO/iTunes_Control/iTunes/iTunes Library.itlp’
    [mk_Dynamic] Processing ‘/tmp/fileyY0zj5/Dynamic.itdb’
    [mk_Dynamic] creating table structure
    [mk_Dynamic] – processing 682 tracks
    [mk_Dynamic] done.
    [mk_Extras] Processing ‘/tmp/fileyY0zj5/Extras.itdb’
    [mk_Extras] re-building table structure
    [mk_Extras] done.
    [mk_Genius] Processing ‘/tmp/fileyY0zj5/Genius.itdb’
    [mk_Genius] re-building table structure
    [mk_Genius] done.
    library_persistent_id = 0xe9b2abe0192848e4
    [mk_Library] Processing ‘/tmp/fileyY0zj5/Library.itdb’
    [mk_Library] building table structure
    [mk_Library] compiling SQL statements
    [mk_Library] – inserting into “version_info”
    [mk_Library] – inserting into “genre_map”
    [mk_Library] – inserting songs into “item_to_container”
    [mk_Library] – inserting playlist ‘bby.woO’ into “container”
    [mk_Library] – inserting songs into “item_to_container”
    [mk_Library] – inserting playlist ‘Podcasts’ into “container”
    library_persistent_id = 0xe9b2abe0192848e4
    device name = bby.woO
    [mk_Library] – inserting into “db_info”
    [mk_Library] – processing 682 tracks
    [mk_Library] done.
    [mk_Locations] Processing ‘/tmp/fileyY0zj5/Locations.itdb’
    [mk_Locations] re-building table structure
    [mk_Locations] Processing 682 tracks…
    [mk_Locations] done.
    libitdbprep: itdb_iphone_stop_sync called
    Segmentation fault

  14. Probablytom said on January 3, 2010 at 6:45 pm
    Reply

    @Iyan Methinks what you are looking for would be:

    sudo gedit /etc/fuse.conf

    Hope that helps.

  15. Probablytom said on January 3, 2010 at 6:40 pm
    Reply

    @Iyan i’ve not been using long either, just passed one year in december :-) but it’s worth making sure you used sudo before the command – that’ll give you access to pretty much anything ( but be careful when you use it! )

  16. Iyan said on December 31, 2009 at 4:48 am
    Reply

    As embarrassing as this is, I’m not a truly experienced Linux user having just converted, when i attempt to open the fuse.conf file, i am denied access to change the file. I can open it and copy it, but not rename, delete, etc. I know that you must access this file with root privileges, but i am uncertain how. Such help would be much appreciated from this humble Linux convert.

  17. alice said on December 29, 2009 at 12:52 am
    Reply

    Okay, i run into a wall in the first line of code. It gives me sudo: add-apt-repository: command not found. Any ideas? im using 8.04 with a new 32 gig itouch.

    1. Jason Bourne said on December 29, 2009 at 1:07 am
      Reply

      may be only meant for 9.10 ?

  18. na said on December 23, 2009 at 5:15 pm
    Reply

    Tested on Ubuntu Karmic with iPhone 3G. Finally I think I can ditch iTunes and gtkpod for good.

    Rhythmbox picked it up as soon as I plugged the iPhone and then asked me to initalize the device. It said it would remove all my music, but it didn’t. Previously I was using iTunes to sync my music. I removed all my music from the iPhone in the rhythmbox interface then dragged and dropped some new music over. Worked perfectly and even synced over some of the album art from rhythmbox.

    1. Anonymous said on December 24, 2009 at 9:26 pm
      Reply

      Trolled

  19. DrJ said on December 23, 2009 at 8:40 am
    Reply

    Well, I’ve tried this in Mint 8, with a 3rd generation 32G iPod Touch and it doesn’t work. To be fair, the first part with fuse doesindeed allow the iPod to be mounted correctly. Gtkpod can then see it just fine and even allows you to (apparently) add music to the iPod, but then when the moment of truth comes and you hit the “save changes” button, Gtkpod crashes, and the new music files don’t get added to the iPod’s database. Pity…

  20. Curtis said on December 22, 2009 at 11:58 pm
    Reply

    Hi Jack,
    There’s a major unanswered question about what ipod Touch/iPhone firmware version this will work with. To the best of my knowledge, the only 3rd party software that can modify the database on a v3 firmware is foobar2000. Can you please let us know what versions you’re working with? Same with libgpod-common libiphone-utils libiphone0.

    ps. Just saw your next article in the series… still no answer…

  21. Christian Decker said on December 22, 2009 at 1:18 pm
    Reply

    I was wondering whether this also works on KDE, so far I had no luck on getting it to work properly, but then I also use the newest firmware which as others pointed out, has an encrypted itunesdb.

  22. boubbin said on December 22, 2009 at 11:33 am
    Reply

    where is the source of this…? i dont believe it can be done with iphones newest firmwares…

  23. Captain Ugh said on December 22, 2009 at 9:01 am
    Reply

    Ugh. Great, if you go suckered in to purchasing one of the iProprietaries.

    I have purposely chosen not to invest in any Apple products until they get their heads out of their asses and start understanding their devices need to conform to some standards like just about every other device out there.

  24. Andrew said on December 22, 2009 at 3:45 am
    Reply

    Does this apply to all versions of iPhone?

  25. Jack Wallen said on December 22, 2009 at 1:13 am
    Reply

    terribly sorry about the confusion on the fuse.conf file. I was so excited to get this process working I wanted to get the tutorial up and didn’t even catch that goof. thanks for the correction. I will make the correction in the article now. ;-)

  26. Maarten Verheijen said on December 22, 2009 at 12:20 am
    Reply

    Yes, yes, finally, it’s working!
    Thank you very, very much!

    Two things:
    this by opening the /etc/gvfs.conf file in your favorite editor and changing this line:
    — this should be —-
    this by opening the /etc/fuse.conf file in your favorite editor and changing this line:

    And, I don’t know why, but as soon as I plugged in my itouch, Rhythmbox popped up, I saw my itouch in the menu and it copied fine to my itouch! And damn I can also copy from the ipod to my computer from the itouch within Rhythmbox.

    Thnak you, thank you

  27. Don Birdsall said on December 21, 2009 at 11:06 pm
    Reply

    Not working for me either.

    Touch is still recognized as camera only. I double checked all the required libraries.

    I will follow this thread in case someone finds a solution.

    1. Jason Bourne said on December 21, 2009 at 11:25 pm
      Reply

      also weird that in gtkpod ipod touch 2nd gen has 2 listings as 8GB silver. i have an iPod Touch 2nd Gen 16GB. where is it?!?

  28. Jason Bourne said on December 21, 2009 at 7:49 pm
    Reply

    so i follow the directions to a T, and i’m still confused about this part:

    “The next step is to edit the /etc/fuse.conf file so that your user will have access to the gvfs file system. Do this by opening the /etc/gvfs.conf file in your favorite editor and changing this line:”

    that lineyou uncomment is in fuse.conf, but there isn’t an /etc/gvfs.conf file in there
    (yes everything is installed & correctly)

  29. boubbin said on December 21, 2009 at 12:04 pm
    Reply

    not working.
    and how it ever could? Apple crypted their itunes db in iphones so ipod wont recognize the music you transfer to your device unless its added to the crypted database and i assume gtkpod cant do this.

    Also i wasnt able to find my device from /home/user/.gvfs, it only mounts my device as camera like it used to do…

  30. manicpop said on December 21, 2009 at 9:38 am
    Reply

    There is no such device as an iTouch.

  31. CJ said on December 21, 2009 at 9:23 am
    Reply

    I have a better way of dealing with this…. Don’t use an iPhone or iPod and instead invest your money in devices that don’t prevent you from syncing. Apple has made it a point to insure that you can’t sync any of their “i” devices with Linux. Hell, even Microsft allows it’s phones to be monted as USB mass storagve devices so that you can copy files.

  32. Jack Wallen said on December 21, 2009 at 4:58 am
    Reply

    @john doe: An iTouch is that piece of inferior technology my 15 year old step daughter insisted she have only to find out she had to use iTunes (which she hates) until I figured out how to sync it in Linux (the operating system she uses). ;-)

    1. John Allen said on December 21, 2009 at 12:15 pm
      Reply

      Sorry Jack, but there ain’t no such thing as an iTouch, or as Unix/Linux would say “No such file or device” :)

  33. john doe said on December 21, 2009 at 12:16 am
    Reply

    awesome. nice post. thanks!

  34. john doe said on December 21, 2009 at 12:11 am
    Reply

    what’s an iTouch? =P

    /ends anal retentive obsession over people using that improperly (should be ipod touch)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.