Sunday November 22, 2009 1:04 AM AEST

Plug your iPod into Linux

  • Email a Friend
  • Print Page
Plug your iPod into Linux
By Staff Writers
Apr 27, 2005
Tags: Linux | ipod | gtkpod | itunes

Are you a Linux user longing for iTunes? A bit of time and a little custom software can bring music to your ears.

Are you a Linux user longing for iTunes? Leigh Dyer explains how a bit of time and a little custom software can bring music to your ears.

Apple has swept the portable MP3 player market with the iPod, and it's not hard to see why. No competitor has yet come close to the elegance of Apple's user interface, both on the iPod itself and its iTunes music software. Linux users miss out on iTunes, but with some alternative software the iPod can be just as easy to manage.

iPod formats

iPods are designed to work on both Macs and Windows PCs, and to do this, they use two different filesystems: Windows iPods use FAT32, and Mac iPods use Apple's HFS+. All iPods ship in Mac format, but they can be formatted from one to the other using software under Mac OS or Windows.

Recent Linux kernels can use Mac iPods directly, thanks to HFS+ support provided by the 'hfsplus' kernel module. There's one snag, however: Mac iPods also use a Mac partition table. Linux has support for this, but it's a compile-time kernel option, so if your kernel doesn't recognise your Mac iPod, you need to either recompile your kernel, or convert the iPod to Windows format using the Windows iPod software.

 
Linux automatically detects the iPod after being plugged in

Plugging it in

Connecting recent iPods to a Linux PC is an easy affair, since they support USB and work just like other removable USB drives. Most distributions automatically mount these, so your iPod should just appear on your desktop. To see where it's been mounted, run the 'mount' command, and look for something like this:

/dev/sda2 on /media/sda2 type vfat

If your iPod isn't mounted automatically, run 'dmesg' and see if it mentions it. USB media devices appear as SCSI drives, so you might see something like this:

SCSI device sda: 39063024 512-byte hdwr sectors (20000 MB)

This shows that the kernel has assigned the iPod to device 'sda'. Windows iPods use partition 2, so try mounting it using this command:

mkdir /mnt/ipod
mount /dev/sda2 /mnt/ipod

For older (first and second generation) iPods, Firewire is the only way to connect them to a PC. Plugging your iPod in via Firewire should be no different from using USB - it should be mounted automatically, but if not, you can do it manually.

gtkpod

Because the iPod uses a proprietary database to keep track of the files it contains, managing your music requires custom software. On Linux, the best option is gtkpod (gtkpod.sf.net), a great GUI utility that offers a similar interface to iTunes. The website has links to packages for various distributions, but it's easy to compile from source as well.

 
The gtkpod interface closely follows that of iTunes
 
 
Syncing the iPod over USB 1.1 can take some time
Run the 'gtkpod' command to bring up the interface. If your iPod is mounted at '/mnt/ipod', gtkpod should start scanning it automatically. If not, select 'Edit Preferences' from the Edit menu, and enter in the mount point for your iPod. Click on the Read button in the toolbar to force gtkpod to read in your iPod's contents.

Once gtkpod has scanned your iPod, you can browse through the contents much like you would in iTunes. Unlike iTunes, gtkpod lets you copy music from your iPod to your PC - right click on a file, artist, or album, select 'Copy from iPod' and enter the destination directory.

On the left, you'll see a list of playlists on your iPod, with the first one, highlighted in red, representing your entire iPod. To view or edit a playlist, click on it. The artist/album/track listings on the right show only the files in the current playlist.

Editing the files on your iPod is easy. To delete a file, right click on it and choose one of the Delete options: 'Delete from Playlist' removes the file from just the current playlist, while 'Delete from iPod' removes it from the iPod entirely, deleting any references to it in other playlists.

Hit the '+ Files' or '+ Dirs' button in the toolbar to add either select files or an entire directory recursively. Files are added to both the iPod and the current playlist. To add the files to other playlists, drag them over to the playlist.

gtkpod doesn't edit your iPod on the fly, rather it records your actions internally. To write your changes to the iPod, click the 'Sync' button. Once the sync is complete, you can close gtkpod and unmount your iPod. You might find that the iPod continues to display the 'Do not disconnect' message even after unmounting. If this happens, use the eject command to tell the iPod that it can be safely disconnected:

eject /dev/sda

 
 
This article appeared in the February, 2005 issue of Atomic.

The latest issue is on sale now!

Want to learn all about Diablo III? Want to find out what the best Solid State Drive is on the market today, and how to look after it? Want to catch up on the latest hardware, games and in depth tech from Australia's best enthusiast mag?

Get your copy today :)
Comments

Be the first to comment on this article.
Thoughts on this article? Add a comment below.
Login or register to submit a comment.
 
 
 
Atomic Magazine

Issue: 107 | December, 2009

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
"Signed. And link and article passed to friends too.
And a link supplied on my facebook too."
by morris | Nov 21, 2009 11:29 PM
 
"I got an XP pro oem with a game build rig 18 months ago and continued to ignore Vista, to my ..."
by TonyB | Nov 21, 2009 10:24 PM
 
"Holy shit, batman.

*runs"
by colganaitor | Nov 21, 2009 7:17 PM
 
""sudo preupgrade"
...failed to download installer metadata
------------
So ..."
by wlayton27 | Nov 21, 2009 8:16 AM
 
"^ I find with CoD4 that I can jump on an empty server and be joined by 6-12 others before the ..."
by Ezekill | Nov 20, 2009 10:10 PM
Latest User Reviews
Shenmue II
10%
asdfasdf
 
EVGA X58 Classified
90%
great board, a few things could be better
 
EVGA X58 Classified
90%
Gorgeous looking
 
Sapphire 4890
90%
So good, I immediately wanted a second one!
 
MSI 790FX-GD70 motherboard
90%
Allmost the prefect gaming board