Using gtkpod with an iPhone or iPod Touch in Debian

You will need to initialize your iphone/ipod-touch with iTunes on Mac or Windows and transfer at least one track first.

Make sure there are deb-src lines in your /etc/apt/sources.list for your main deb lines.

Install some packages:

sudo apt-get build-dep gtkpod
sudo apt-get build-dep libgpod
sudo aptitude install build-essential git stow ifuse libusb-1.0-0-dev libimobiledevice-dev libplist-dev

Build and install libgpod:

git clone git:// libgpod
cd libgpod
sh ./
sudo make install

You can make uninstall to remove it later when needed, don't remove the source directory.

Make sure your user LD_LIBRARY_PATH lists /usr/local/lib before /usr/lib. It should look something like this:

export LD_LIBRARY_PATH=~/lib:/usr/local/lib:/lib:/usr/lib

Build and install gtkpod:

git clone git:// gtkpod
cd gtkpod
sh ./
sudo mkdir -p /usr/local/stow/gtkpod-git
sudo make install prefix=/usr/local/stow/gtkpod-git
sudo rm /usr/local/stow/gtkpod-git/share/icons/hicolor/icon-theme.cache
(cd /usr/local/stow; sudo stow gtkpod-git)

Use stow -D to uninstall later.

Connect your iphone via USB and mount it:

mkdir ~/mnt
ifuse ~/mnt/ipod

You can unmount with fusermount -u ~/mnt/ipod.

Now you need your iphone firewire ID. In the sudo lsusb -v output, for the Apple, Inc. device, look for the second number following iSerial, it should look something like 1dfb33113eff41bc1e99ef98b0cb103a02322c4c .

Create this directory on your iphone:

mkdir ~/mnt/ipod/iTunes_Control/Device

Now set up the "extended sys info:"

/usr/local/bin/ipod-read-sysinfo-extended 1dfb33113eff41bc1e99ef98b0cb103a02322c4c ~/mnt/ipod

Use the firewire ID you got earlier, not the one in the example!

Now launch gtkpod and select your model; transferring music should work properly.

Big thanks to teuf on freenode #gtkpod (Christophe Fergeau) for helping me get this to work.

Last modified: 2010-6-7 (月) at 6:27 pm