Using iPod Nano in GNU/Linux
[ Friday, 11 August 2006, michuk ]
iPod is the most popular portable music player in the world. In this article we are going to describe the current status of iPod support in GNU/Linux and present the key applications (open-source only!) which can help us, Linux users, manage our iPod music collections.
We tested the behavior of iPod Nano (the white one :P) under Ubuntu 6.06 for both x86 amd amd64 processors with Gnome and KDE desktops. Only the music management issue is covered in this text. For coping with other iPod problems please consult one of the referenced articles.
iPod - how does it work?
In contrast to most of the mobile MP3 players, iPod requires special software to be installed on a client computer in order to make use of it. In simple words - it’s not enough to copy the MP3 (or AAC) files to the device’s filesystem to make them available in iPod. An entry in a special database (iTunesDB) is required to allow them to be played. Unfortunately, the format of this special DB is proprietary and Apple does not make it easy for potential third-party companies to write software supporting iPod music players. iTunes - a program developed by Apple for this purpose is only available for MacOS and MS Windows operating systems. No version for GNU/Linux or BSD is provided.
Sounds bad but it’s actually not as bad as it sounds. Due to the continuous effort of free software developers around the world, the hole has been filled with a fistful of applications which allow for iPod support in GNU/Linux, whether Apple likes it or not. The key role is played by the libgpod library, created using a technique called reverse engineering. The library delivers a stable API which can be used (the power of open source!) by others to provide iPod support in their software (like music players) for a pretty low cost.
iPod as a device in GNU/Linux
![]()
Pic 1. Ubuntu detects iPods automatically
- the view of Nautilus file manager
The new iPod models are provided with a USB cable which is used to connect it to a PC. This solution is much more friendly compared with the previous one (through a firewire port). Popular GNU/Linux distributions automatically detect an iPod device and mount it as a usual flash storage volume. Thanks to this, we can successfully use iPod as a portable memory stick for our private documents, photos and such. Copying the songs directly to the iPod filesystem is hoverer useless since it won’t be able to play them without a database entry mentioned before.
In case our distro does not recognize iPod automatically, we can still mount it manually using a command like mount -t vfat /dev/sda /media/ipod (provided that we had created a folder /media/ipod before).
iPods can work in two modes called “Windows” and “Apple”. The difference is in filesystems used. The “Apple” iPod uses an Apple filesystem - HFS. In such case we have to enable the hfs module in kernel and use a different argument for mounting our player: mount -t hfs /dev/sda /media/ipod. If we don’t want to mess around with kernel modules, we can simply format our iPod with a vfat filesystem and recreate the system folders using GTKPod. More about that later in this article.
Finally, we need to remember to unmount the device before unplugging it. Unmounting is important since it protects us from potential data loss. In Gnome it’s as simple as clicking on the iPod icon with a right mouse button and choosing the Umount option. A similar option exists in KDE desktop - it’s called Safely remove. Remember to close all apps that may have been using iPod before unmounting. If we like, we can also unmount the device manually. The following command will do the job: eject /dev/sda (provided that iPod has been mounted as sda before - if not, try sdb or sdc and so on, depending how many USB ports your computer has got). Upon successful unmounting, the message “do not disconnect” on iPod’s LCD screen should disappear. This means it can be securely unplugged.
GTKpod - the top Linux tool to manage iPods
GTKpod is the most functional single application supporting iPods under Linux. It’s not a music or video player and cannot be used to order music from the iTunes store. The only goal of this program is to allow top-level iPod support in terms of managing its files and metadata. The GTKpod interface resembles the iTunes one - it’s equally cumbersome :P. However, if you ever used iTunes, you’ll probably be at home with GTKpod as well. The interface is divided into two panes. In the left pane there are all the playlists. The top of them (marked with bold font) is the iPod itself. On the right, there are all songs of the selected playlist (or songs of all playlists in case where the iPod icon is selected).
Adding new songs
New songs can be added using the +Files (single files) or +Dirs (whole folders) buttons. The songs added this way will be automatically assigned to the currently selected playlist. We can transfer some previously created playlists to iPod as well. We do it by clicking the +Playlist button. The accepted formats are *.pls and *.m3u.
Removing songs
The songs can be removed from iPod by selecting a track with right mouse button and choosing one of the options:
- Remote from playlist - this just removes the song from the current playlist leaving it on the device
- Remote from iPod - removes the song or folder physically from iPod and all the possible playlist
Synchronizing the changes
GTKpod does not automatically save the performed changes to iPod. In order to apply the changes we need to press the Sync button. Saving the changes can take from a few seconds to even couple of minutes, depending on the USB speed and the amount of recorded data. Remember to always unmount your iPod before unplugging!
Other options
Except for the standard functionality (copying songs, creating playlists) GTKpod offers a few quite useful extra functions. We’ll go through them very roughly. For details, consult the manual provided with the software.
- One of the nice options of GTKpod is advanced filtering and searching the songs library with keywords. The search tool is quite special since it allows for massive ID3 tags modification (basing on the file names of tagged songs). The tag editing option is quite useful if we have some untagged songs - remember that iPods display song titles and other key metadata using ID3 tags only.
- GTKPod can be also used for iPod initializing. This is usually done when you fist buy your iPod, but if you need to change iPod’s file system or you mess up with it (i.e. by installing software on it) it may be the only rescue. Initializing basically means creating the iPod-specific folders on the device together with an empty iTunesDB file.
- It’s very annoying when the sound volume of particular songs differs a lot. The normalize option can be used to adjust the volume of all songs stored on our iPod to a standard one. This action can really improve our music impressions dramatically in some extreme cases.
- Offline mode for managing the iPod library is useful when we cannot connect the device at the time, but still want to prepare a new load of songs for it. The state of playlists can be later synchronized with the iPod when it is connected to our PC.
- More GTKpod options can be found on the project’s webpage: What can GTKpod do?
Popular Linux audio players supporting iPod
More and more audio players for GNU/Linux support iPod in some limited way. Typically, copying and removing tracks for iPod are supported as well as playing music directly from the device. Here is some detailed information about selected audio players concerning their iPod support.
Amarok
The default KDE audio player has recently (since version 1.4) gained quite decent iPod support (both read and write. After plugging it the device, the current status of iPod collection can be constantly watched in the Multimedia tag. Copying songs is as easy as dragging them from the playlist and dropping in the iPod section. After pressing Transfer the files are copied and added to the iTunesDB. Unfortunately only the basics are supported (adding and removing songs). There is no way to manage your playlists or use other advanced options known from GTKPod. Anyway, it’s still enough for normal, every day activities of most users.
Older versions of Amarok (before 1.4) provided very poor iPod support (they used some KDE-specific solution instead of using libgpod) and had random stability issues. Thus, I strongly encourage you to try the latest version only.
As Amarok is being developed very actively, we can expect even better support of our favorite portable MP3 player quite soon.
![]()
Pic 3. Current version of Amarok supports iPod in a reasonable fashion
Rhythmbox
Rhythmbox, the default Gnome player provides (in version 0.9.3.1 from Ubuntu Dapper Drake) only read access to iPod songs and playlists. The work is in progress to add full iPod support (using the libgpod library of course)… but if you need iPod write support in Gnome right now, you can either use Amarok (a bit slower in Gnome but still usable) or switch to alternative MP3 player.
![]()
Pic 4. Rhythmbox can only read and play songs
Update: Rhythmbox 0.10.0 supports iPod in a reasonable manner, read more: How to manage your iPod using Rhythmbox in Ubuntu.
Banshee Music Player
Banshee is a music player for Gnome which has recently gained some attention. It’s slick, has nice collection support and a few killer features (at least over Rhythmbox). One of them is its iPod support. iPod is detected and automatically added as a device on the left pane of the program. We can listen to iPod songs directly from its filesystem and synchronize both the current playlist and the whole Banshee library with our portable player.
Banshee is also nice to look at (unbelievable since it’s a Gnome app!) and provides a very intuitive user interface, easy to learn even for your grandma. If its developers put more efforts into some advanced features but manage to keep its slickness, Amarok may have a real competitor soon.
![]()
Pic 5. Banshee synchronizes its collection with iPod
Gnupod tools - terminals don’t bite
If you hate the graphical user interface or simply prefer to work with fast console tools, the utilities from gnupod-tools package may be useful to you. Some essential scripts are presented below.
-
gnupod_addsong - can be used to add new songs to the iPod database. We can add a song to one or many playlists, modify ID3 tags (which are used for song metadata organizing), and even modify the quality (and the size) of a song while copying it to our iPod (option
--reencode=int, whereint=0..9- the higher value, the worse quality and smaller size). - gnupod_check - together with
--fixitoption checks and repairs potential problems with iTunesDB (the problems can be caused if you unplug iPod without unmounting it, as well as by some bugs in the software used to manage your iPod) - gnupod_search - a command which helps to search through iPod library as well as modify the ID3 tags of selected songs on the fly. What is not so intuitive, the command can be also used for removing tracks from an iPod.
Summary
As you can see, even though iPod is a propriety technology and Apple does not do anything to provide any help for the alternative operating systems’ users, its support under GNU/Linux is still quite good. Thanks to the efforts of many free software developers around the world, we can use our iPods under our favorite OS without major issues. This is just another proof of the indisputable power of open-source. But this is also a sign for Steve Jobs’s company. The market demand for such software is noticeable. If Apple does not react (and provide a usable iTunes version for GNU/Linux and BSD), it may happen that the competitors (iRiver, Creative, anyone?) do it before them.
Other articles on iPod and Linux
- An iPod under Linux - how to encode and play video for iPod under Linux
- Using an iPod with Linux by Alan Donovan - a more technical article on troubleshooting the “iPod on Linux” issue
- Using an iPod mini with Linux - article by Pedro Diaz
- Using an iPod in Linux - What can you do with an Apple iPod and Linux that you can’t do with Apple’s iTunes? Plenty.
Subscribe to RSS feed for this article! | Trackback URI
14 Comments
- A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
- Strong text: <strong>Strong text</strong>,
- Italic text: <em>italic text</em>,
- Strike: <strike>
strike</strike>, - Code: <code>
printf("hello world");</code>, - Block quote: <blockquote>Block quote</blockquote>
















I think that your guide is very interesting. Can i translate it in italian and put it in my site?
I’ll put the link to this page.
Thanks for the answer.
No problem as long as you put a link to oryginal version and mention that this is only a traslation.
It’s ok, it’s normal to mention that this is a translation.
Thank you.
Wow this is great, it even thaught me a little something
Good read 
Amarok 1.4. allows to edit ipod playlists:
- you can transfer playlists, as available within Amarok, to the ipod
- in the media device view, there is a toplevel item ‘Playlist’ - you can manage your playlists there via drag & drop
Did anybody have any luck with syncing photos’s to a Nano ?
Regards, Novy
Where do I find a site that easly directs me to downloading both my ipod nano and limewire software on to ubuntu. Thanks.
This is brilliant Michuk!
Thank you for a very clear explanation of many apects of this tricky problem - I’m going to try gtkpod now - it will do all I want - I was just able to read “podcast” in your screen shot.
I tried Yamipod (Windows open source) and in Windows it was OK for music but could not see the podcast area (a directory I assume) . In Linux using Wine it needed to access the USB port directly which cannot be done in Wine.
Thanks again
Dave
Another option to use iPod with Linux is http://www.floola.com.
Great article
Would it be a problem if i translated it to Danish and posted it on the web??
Regards
Patrick Steffensen
Patrick, I see no problem with that, provided that you put a link to the original.
[…] I discovered an article on using the iPod Nano with GNU/Linux after an extremely brief search, and this article led me to believe that getting an iPod to work with GNU/Linux would be rather simple. Of course, I missed the line that should have been a warning to me: “Only the music management is covered in the text.” […]
[…] that helped: Using an iPod with Linux Using iPod nano in GNU/Linux iPod exodus Using an iPod in […]
[…] Using your iPod with Linux. TimeVault is an interesting app that’ll hopefully be in Gutsy. And list of useful little Ubuntu apps you might want to know about. […]