This page will help you connect your Apple iPod, iPhone or iPad devices to Ubuntu.

Ubuntu 14.04 Trusty Tahr

The upcoming Ubuntu 14.04 LTS will support devices running iOS7 software version, thanks to newer libimobiledevice.

Ubuntu 12.04 Precise Pangolin

Ubuntu will automatically detect when you're plugging an iPad to your computer and will identify (via GVfs) two devices: 'My iPad' and 'Documents on My iPad'. You can mount each device manually using a frontend to GIO/GVfs such as Gigolo, Thunar (>=1.6.x) or Nautilus. To transfer files to your device---and make them available to your apps on the iPad---you cannot simply drop files in the 'My iPad' device. But the following may work.

Once you've "connected" to the 'Documents on My iPad' device using Gigolo, you can access the device via a file manager such as Thunar (>=1.6.x; see Xfce 4.12 PPA) or Nautilus and access the 'Documents' folder of the apps that support the iTunes Document Sharing feature (also called the "House Arrest" protocol). Copying files to this 'Documents' folder will make some apps pick up the files and allow you to view/edit/delete them on the iPad.

Following is a non-exhaustive list of free apps that support file transfers as described above:

  • Videos or Audio: 'OPlayerHD Lite', 'HD Player'
  • Photos: 'Another Photo Viewer'
  • PDFs or E-books: 'Documents 2', 'ciando Reader'

Sometimes it may be necessary to restart the app to make it aware of the transferred file, or possibly even reboot the device.

To enable USB Tethering just install the ipheth-utils package.

Ubuntu 10.04 Lucid Lynx

Lucid natively supports both iPhone and iPod Touch 1G, 2G, 3G, 3GS and 4G models (iPad should also work) running up to firmware 4.0.1 without the need to jailbreak. This is due to GNOME 2.30 libimobiledevice support. For a video demo see this youtube video. For the iPhone4 (iOS 4.1), music syncing does NOT work as libgpod has not implemented this yet. You can view the iPhone filesystem by using ifuse.

If you have a password set up on your device, unlock it first before connecting the USB cable, otherwise Ubuntu will not recognize it.

USB Tethering is not supported out of the box, but you can make it work by following this guide

iPod 5G Nano: After making sure libimobiledevice is installed (and possibly reinstalling it if necessary) you may need to re-install the network-manager package in order to be able to read and write properly.

Music players

Syncing with Rhythmbox

After connecting the iPod, open Rhythmbox and click on your iPod name under Devices on the left panel.

You can play music from the iPod and transfer music to it by drag-and-dropping files from the Library onto the iPod icon. Please note: you might need to restart the Rythmbox for it to recognize the album art on the newly uploaded tracks.

Syncing with Amarok

Amarok 2.3 and avobe installed from the repositories should automatically recognize the iPhone. It will show up under Local Music.

Screenshot: Ubuntu 10.04. Amarok 2.3. iPod Touch 2G


iPhone no longer recognized by Amarok

If your iPhone is no longer recognized by Amarok for some reason try deleting config files to see if it fixes the problem. Quit Amarok and then:

$ rm -r ~/.kde/share/apps/amarok
$ rm -r ~/.kde/share/config/amarok*

Start Amarok and your iPhone should be recognized again.

The Claim "Device is not present"

A "gotcha" currently exists if you accidentally "sudo" the iphone-mount or ipod-touch-mount step. Doing so will create a template file set at your mount location (eg. /media/ipod) and subsequent mount operations will fail uncleanly. If this occurs, verify the device is indeed not mounted, clean out /media/ipod, verify the permissions are correct, and mount again as your normal user.

Music unplayable or unlisted in device but is shown in Ubuntu Media Player

The most frustrating "gotcha" is failing to have a correct FirewireGuid written onto your device. This is normally generated when the device is attached for the first time, assuming you had the device plugged in via USB at the time. If this hash is incorrect or not present, iTunes will refuse to load the database. See Retrieving and setting the Firewire GUID (FirewireGuid) for information on how to set the FirewireGUID.

If the music still doesn't appear on your iPhone/iPod, you might have to restart the music playing programme. Select music and hold down the main button for a few seconds. You'll be dumped back to the main screen.

Please see the section above on setting the Firewire GUID.

No Cover Art with Amarok

If you find that after syncing your iPhone with Amarok the coverart is missing it is very likely that you are using the wrong version of libgpod. Amarok depends on libgpod and the Ubuntu repositories version installs libgpod v2 instead of the needed libgpod v3.

Here is a workaround:

  • Uninstall libgpod v2. This will also uninstall Amarok
  • Open Synaptic and uncheck all the repositories but

  • Refresh
  • Install libgpod v3 and Amarok
  • Re-check all the previously unchecked repositories
  • Start Amarok and connect to your iPhone
  • Make sure that the correct kind of iPod is selected in Amarok (under iPod → iPod Models → Mobile Phones)
  • Click on Refresh Graphics and on Disconnect (this might take a while)

You should have your Coverart correctly loaded on the iPhone afterwards.

Device full, "how were I to know?"

If you have followed previous steps and set it up to mount your device to a directory on your local computer, there is no way for any program interacting with that directory to tell how much free space is left on the device. In essence, the directory exists on your hard-drive, and any attempts to divine free space would simply return the free space of that hard-drive. For the time being, you can query the device itself in an SSH session. See previous sections of this wiki for information on how to connect to it in such a way.

Log into the device via SSH, then enter this.

$ df -m

The output of that command will look something akin to the following:

Filesystem   1M-blocks Used Avail Capacity  Mounted on
/dev/disk0s1       300  277    19    94%    /
devfs                0    0     0   100%    /dev
/dev/disk0s2      7443 7395    48    99%    /private/var
  • The bottom-most line signifies the storage partition.
  • Filesystem is a denominator for the device node of that partition.

  • 1M-blocks shows its capacity in megabytes. In this case, 7443 mb.

  • Used shows how many megabytes are used. In this case, 7395 mb.

  • Capacity shows how much space is currently used, in percent. In this case, 99%.

  • Mounted on shows where the partition is internally mounted on the device, much like you mount the device's SSH interface to a local directory for file transfers.

Device does not mount after iOS upgrade

The original libimobiledevice packages shipped with Lucid, Maverick, and Natty did not work for devices running iOS 4.2.x or above. A common sign of this when you connect the device to a USB port but it does not auto-mount in Nautilus or show up in Rhythmbox. As of 17 July 2011, this has been fixed in the updates (see launchpad bug 793616 for details). Compatibility patches has been needed both for the upgrades to iOS 4.2.x and 4.3.x, so it is not unlikely that future iOS upgrades will need an updated libmobiledevice library.

A logout / login or reboot after package upgrade may be necessary to allow the auto-mounting to work.

If you still have problems, and get TLS error messages when typing the command 'ifuse /media/iphone' in a terminal, rename the ~/.local/libimobiledevice folder to ~/.local/libimobiledevice.old or delete it.

"Unhandled Apple File Control error"

If you're getting a: "Failed to open directory "ggImageViewer". Unhandled Apple File Control error (7).", then it is possible that the relevant app doesn't properly support the Apple file sharing protocol. Sometimes though it helps if you simply disconnect the 'Documents on My iPad' device, unplug the iPad, then plug it back and reconnect the device. Then you might be able to normally access an app's sandboxed 'Documents' folder.

Amarok fails to mount device

While Amarok automatically detects iOS devices, newer versions of the firmware might not be supported. In this case, Amarok might fail to properly mount the device, and require iFuse to do so. Amarok will, however, refuse from writing to the device, to prevent data loss or incompatibilities.

See Also


PortableDevices/iPhone (last edited 2014-03-27 08:35:17 by timo-jyrinki)