search technology reviews, news, features, group tests
Popular Searches:   sony , free , dell
 |  Register
 |  Newsletters  | 
Sitemap  |  RSS
RSS
Friday December 5, 2008 12:56 PM AEST
Skip Navigation LinksPC Authority > Tutorials > Plug your iPod into Linux
Plug your iPod into Linux

Plug your iPod into Linux

by Staff Writers  on Jan 18, 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 PC Authority.


Ads by Google

Be the first to comment on this article.

Login or register to submit a comment.


Reliability & Service Awards 2008 Winners Announced!
 
 
Post a review to WIN $3000 worth of tech prizes - Register now!