Every Flavour Beans

“The time has come…to talk of many [technologies].” –Lewis Carroll(’The Walrus and the Carpenter’)
Development Tools. Web Frameworks. GNU/Linux. Nokia N800. Video Encoding.

June 9, 2006

Connecting iPod to GNU/Linux System(Gentoo, Ubuntu, Fedora etc) Using Gtkpod

Filed under: GNU/Linux, Gentoo, Ubuntu — tabrez @ 9:13 pm

A lot of media players on GNU/Linux support the iPod MP3 players these days(for eg: amaroK, Banshee, Rhythmbox etc). I personally use Gtkpod to transfer the music from my Gentoo machine to the iPod player. Once configured, its really easy to use the Gtkpod application to do the music transfers. First install it using the package manager available on your operating system:
On Gentoo:

sh# emerge gtkpod

(I have added ‘aac’ support to Gtkpod by adding a line ‘app-pda/gtkpod aac’ to /etc/portage/package.use file before doing the emerge)

On Debian/Ubuntu/Kubuntu:

sh# sudo apt-get install gtkpod

On Fedora/SuSE/Mandriva:
Use RPM files or Yum/Yast/urpmi/etc package managers to install Gtkpod.

Its a GTK application, so if GNOME is installed, Gtkpod should be very easy to install on any GNU/Linux distribution, even if it means compiling it from the sources.

Now connect iPod to the USB port of the computer using its data cable and use ‘dmesg’ command to find its device name:

sh# dmesg | tail
sdb: Write Protect is off
sdb: Mode Sense: 6c 00 00 08
sdb: assuming drive cache: write through
SCSI device sdb: 58605120 512-byte hdwr sectors (30006 MB)
sdb: Write Protect is off
sdb: Mode Sense: 6c 00 00 08
sdb: assuming drive cache: write through
sdb: sdb1 sdb2
Attached scsi removable disk sdb at scsi4, channel 0, id 0, lun 0
usb-storage: device scan complete

Don’t panic; just try to find the names that look like sdaX, sdbX, sdcX etc from the output. You can see sdb1 and sdb2 in the above output, so these are the two devices that represent iPod on my machine. The music files are stored in the second partition of the iPod, so I need to mount sdb2 in my filesystem before I run Gtkpod so that it can see the iPod music folders. Mount the device and run Gtkpod:

sh# mkdir /mnt/ipod
sh# mount /dev/sdb2 /mnt/ipod
sh# gtkpod

Gtkpod Before Connecting to iPod
The name of the iPod device should be visible in the left pane of the Gtkpod application(along with the label ‘local’ which is used to store local playlists). Select the name that represents your iPod device and select File->Read iTunesDB (or “Read” button from the toolbar). All the tracks and playlists from iPod should now be imported into Gtkpod. You can click the visible tracks to play them on the computer.
Gtkpod After Connecting to iPod

To transfer music to iPod from the computer, either create a new playlist or select an existing playlist in the iPod. To create a new playlist, highlight the name of the iPod device as visible in the left pane of Gtkpod and click “New PL” from the toolbar. Enter a name for the playlist when prompted. Now highlight the playlist into which you want to add the new music files and then select File->Add Files or File->Add Dir. Select the music files and press “Open” or the “OK” button. To finally write the added files/directories to iPod, click the “Sync” button from the Gtkpod toolbar. Wait for the files to be transferred to the device and then quit the application. Before you disconnect iPod from the comupter, don’t forget to first unmount the device:

sh# umount /mnt/ipod
sh# eject /mnt/ipod

Now you can safely unplug iPod from the computer. Browse through the playlists in iPod to check if the files have been properly added to the device or not. Once you are satisfied, you can make the above process simpler by automating some of the steps that we have performed. As a first step, add the following line to the /etc/fstab file:

/dev/sdb2 /mnt/ipod noauto,users 0 0

Replace sdb2 and the mount directory as appropriate for your case. Now a simple command will mount the iPod player:

sh# mount /mnt/ipod

Gtkpod can be configured to automatically do this step for us at its startup time(and unmount the device when it exits). Go to Edit->Edit Preferences (or press Ctrl-P) and enter the mount directory(/mnt/ipod) in the first text field. Then check the field“Handle mounting/unmounting of ipod drive” visible just below the text box. Click the OK button. Now you can just plug the device to the USB port and start the gtkpod application; it will automatically handle mounting and unmounting of the device. However, if ever you get an error message while quitting the application that it was not able to unmount the device properly, make sure that you manually unmount the device before unplugging it.

You can do a lot more with your iPod from GNU/Linux using the Gtkpod application; more details are available in its ReadMe file.

Libraries like libnjb make it possible to connect a lot of other popular MP3 players(many of the Creative MP3 Players) to the GNU/Linux machines. The latest MTP devices released by Creative are a tough nut to crack though, but the cousin project of libnjb, called libmtp, might just make it possible within a short period of time. One of the several frontends available for the Creative MP3 Players that are supported by libnjb library is Gnomad2.


If you want to receive future posts by email, enter your email address here:

Related Posts:

  • Installing C++ Boost on SuSE and Fedora
  • Linux Bible 2007 Edition: Install/Run 10+ GNU/Linux Distributions(Ubuntu, Fedora, Gentoo etc)
  • Step 4(a): Converting AVI Format to iPod Format Using Videora iPod Converter
  • Installing Sun Java SE 6, Maven 2 and Tomcat 5.5 on Fedora GNU/Linux
  • Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10)
  • 7-Zip Compression Format Support on GNU/Linux Using p7zip
  • Step 4(b): Converting DVD(VOB) Format to iPod Format in One Step Using HandBrake

  • Readers who viewed this page, also viewed:


    2 Comments »

    1. Hi everyone.
      What's a good alternative to the IPOD?
      I'm wondering if any of you can recommend a good MP3 player that is comparable to the IPod but WITHOUT they hype and price tabe to go with it.
      I was at the apple store a few days ago, and really liked the new 40GB or 80GB IPods that also show video, but was wondering if I could get the same kind of funcationality without that heftly price tag.

      Quote

      Comment by Khalil — November 18, 2006 @ 8:23 pm

    2. Creative MP3 players(Zen Sleek for example) are comparable to iPods in terms of features and are easy on the pockets. Their video players are either costlier than iPods(but with larger screen sizes) or have high defect percentage. But the entire industry is working towards getting compatible with iPod players, so the extra cost will get more and more justified as the time goes on. Some reasons to go for iPod players:

      1. More number of accessories available at more retails shops
      2. More number of applications are created for iPods
      3. All podcast audio and video files are made available at least in iPod compatible form
      4. GNU/Linux has better support for iPods

      If none of the above points are of any concern to you, then the alternatives can be considered from Creative, iRiver etc(especially if you are looking for voice recording and FM Radio like features).

      Quote

      Comment by tabrez — November 19, 2006 @ 3:06 pm

    RSS feed for comments on this post. TrackBack URI

    Leave a comment

    Subscribe without commenting


    Copyright (c) 2006, 2007 Tabrez Iqbal.
    Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved. A copy of the license is included in the section entitled "GNU Free Documentation License".


    Powered by WordPress
    This website is hosted by Dreamhost