When I plug in the iPod, it is recognized as a generic USB drive. I got the udev rule to creat a /dev/ipod node for it, but it needs to be mounted to /media/ipod, because that's where gtkPod looks.
I can manually mount it at the command line (from root) with the following command:
- Code: Select all
mount -t vfat /dev/ipod /media/ipod/ -o uid=<my username>,gid=users
This works, and allows gtkPod to read and write to the device. But I don't want to have to do that every time I plug it in. Is there a way to configure it to automatically mount to this directory (with the proper ownership) everytime it is detected? I know it's possible, because Ubuntu handled it flawlessly.
UPDATE: I've solved the problem. I just needed a few more changes. Here's what I did:
First, I needed a udev rule:
- Code: Select all
BUS=="usb", SYSFS{manufacturer}=="Apple*", SYSFS{product}=="iPod*", KERNEL=="sd*
2", SYMLINK+="ipod", RUN+="/etc/hotplug/usb/ipod"
I saved this as /etc/udev/rules.d/60-ipod.rules. The kernel name of sd*2 is necessary, because the data partition of the iPod is the second partition, not the first one. Mine is Windows formatted; I don't know if this is different in Mac formatted iPods.
Second, I needed to add the following line to /etc/fstab:
- Code: Select all
/dev/ipod /media/ipod vfat async,nodev,nosuid,user,rw,noauto,umask=0000,noexec 0 0
(NOTE: This is for a Windows-formatted iPod. If it's formatted for Mac, replace "vfat" with "hfsplus".) This gives all users permission to mount /dev/ipod to /media/ipod by just typing "mount /dev/ipod" at the command line.
With these changes, I was almost there. I would plug in the iPod, the "removable drive" icon would show up, and all I had to do was click "mount" on the menu. However, there's one more step that makes it mount automatically to /media/ipod so gtkPod can read it. Notice the hotplug script referenced in the udev rule. That script is as follows:
- Code: Select all
#!/bin/sh
su <my username> -c "mount /dev/ipod"
The su command is important, because the hotplug script runs as root. Without this, it mounts the drive as root, and then you can only remove it by unmounting at the command line as root.
