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.

Loading music onto an iPod

This process was tested on Ubuntu 14.04, using an iPod Classic 160GB, Windows XP SP3 running in VirtualBox 4.3.12, gtkpod 2.1.4, Rhythmbox 3.0.2.

If the iPod has been formatted Macintosh, then when it is mounted in Linux, it will mount as a read only file system, even with hfsprogs installed. Even running gtkpod as a super user, you will not be able to write to the iPod. Using a Windows system or VirtualBox running Windows with iTunes installed, iTunes will inform you that it is Macintosh formatted and will volunteer to format it to factory defaults. You should choose this option. Once it is formatted back to factory defaults, you can dispense with Windows, plug the iPod into a USB port and Ubuntu will correctly mount it as read write.

A number of music players may or may not interface with an iPod.

  • Rhythmbox - Although Rhythmbox will list the iPod on the left sidebar in its Devices section, it will not show any playlists that are on the iPod so you will need another Linux tool to load the files into the iPod's playlists.

  • Banshee - Banshee's integration with the iPod is much better than Rhythmbox. The iPod shows up in the left sidebar in the Devices section and you can drag-and-drop playlists on top of the iPod device and it will load in the files names into the library, convert them to a format suitable for the iPod and synchronize between the iPod and Banshee all very smoothly without crashing as gtkpod does. What it does not do is manage iPod playlists as it cannot see them. For getting tracks into the iPod it is very efficient.

  • Clementine - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod.

  • Audacious - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod.

  • Amarok - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod.

  • Guayadeque - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod.

  • Exaile - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod.

  • Gnome - Is a frontend for the Music Player Daemon and does not interface with the iPod.

  • JuK - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod.

  • Decibel - Does not recognize the iPod.

  • Cantata - Is a frontend for the Music Player Daemon and does not interface with the iPod.

  • Tomahawk - Does not recognize the iPod.

  • Ncmpcpp - Uncertain how this would work with the iPod.

  • Open Cubic - Uncertain how this would work with the iPod. Looks like a primitive, non-GUI music player.

  • Glurp - Looks like a frontend for the Music Player Daemon and does not interface with the iPod.

  • Goggles - - Does not recognize the iPod.

  • UDJ - Looks like a front end for a music server

  • Abraca - - Recognizes the iPod and will load tracks from the iPod into its application. It cannot access playlists that exist on the iPod, nor can it create them on the iPod. One problem is that it is impossible to quit the application. It leaves no indicator on the indicator panel, nor is there an entry in the list of players attached to the sound indicator in the indicator panel. It appears to be an xmms player.

  • Cynthiune - - Does not recognize the iPod.

  • Aqualung - Will allow import of files from the mounted iPod but not whole folders.

  • Minirok - Will allow folder browsing and access at the file level to tracks stored on the iPod but is fairly basic.

  • Musique - - Does not recognize the iPod.

Of all the music players, most are basic players, some like Rhythmbox and Banshee offer better integration with the iPod, but ultimately gtkpod is needed to manage the iPod.

Before you plug in your iPod, you can use Rhythmbox or Banshee to prepare your music by creating a number of different playlists in Rhythmbox or Banshee. Although you can save these playlists to a file, if you try to drag-and-drop the playlists into gtkpod's Playlist Tracks pane, it will fail because it prefixes the music file locations with your home folder. For example if you have the music file "ACDC - Highway to Hell.mp3" in the default Music folder, e.g. /home/fred/Music, it will try to fetch the file from "/home/fred/file:////home/fred/Music/ACDC - Highway to Hell.mp3"

The way around this problem is to first create matching but empty playlists on the iPod using gtkpod, select a single playlist on Rhythmbox and select the corresponding playlist in gtkpod and drag-and-drop the files within the Rhythmbox playlist to inside the corresponding gtkpod playlist. There is one problem however. Gtkpod seems to run too many parallel processes and constantly crashes. If you are moving a lot of files over, you can move them 100 at a time, restarting gtkpod when it crashes and repeating the selection of 100 files until it successfully transfers them from Rhythmbox to gtkpod. Before taking this approach, in the Preferences/Settings, make sure you have unchecked the "Allow duplicate files" in the music tab, this way you will not accumulate duplicate files.

This issue appears to be related to the file conversion process. It may be resolved by adjusting the "Maximum threads" settings from 0 (no limit) to a number such as 4 and increase or decrease to get the most work with a stable application. The "Maximum cache size" could also be reduced or increased to try to stabilize the application.

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

Troubleshooting

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 http://ppa.launchpad.net/ipod-touch/ubuntu

  • 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


CategoryPDA

PortableDevices/iPhone (last edited 2014-05-30 04:29:06 by 24)