Summary: | gtkpod can't eject as user. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Olliver Schinagl <oliver> |
Component: | Current packages | Assignee: | Olivier Crete (RETIRED) <tester> |
Status: | VERIFIED WORKSFORME | ||
Severity: | enhancement | CC: | davec-gentoo, pda |
Priority: | High | ||
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
sudo enabled ebuild
patch to let us call sudo eject helpfull documentation script that let's us eject via sudo |
Description
Olliver Schinagl
2006-03-02 18:24:57 UTC
Created attachment 81168 [details]
sudo enabled ebuild
Created attachment 81169 [details, diff]
patch to let us call sudo eject
Created attachment 81170 [details]
helpfull documentation
Created attachment 81171 [details]
script that let's us eject via sudo
you can use ~/.gtkpod/gtkpod.out to issue your own commands to unmount.. Or even better, use the latest gtkpod/libgpod and compile libgpod with the hal use flag and it should all be done automagically using pmount. I actually did use HAL with libgpod and it segfaulted, so I figured i'd stay with the old for a bit. Anyway, the application always calls internally eject, assuming it has permissions to the iPod. Since you can't change the group of the ipod device (if you don't have it as group disk, strange things seem to happen?). Anyway, as I mentioned, this should only be a temporary workaround until a better solution comes along. Currently, without HAL, you either have to make your ipod world writeable (.. no thanks) or put the eject in the gtkpod.out (which makes it that you have to update your ipod location on several positions, inside gtkpod, and in the script since you can't pass it an parameter. Do you use the gnome desktop? My new setup is to let gnome-volume-manager handle the mounting/umounting. In the properties, check the multimedia/ipod section and have gtkpod has the command. It then start gtkpod when I plug in my ipod and umounts it when stop gtkpod. I don't use GNOME no. That, and mounting/umounting works like a charm, don't need gnome for that : ) You do however need to 'eject' /dev/sdX to let the ipod know it is done being in diskmode. The only 2 ways I can think of doing this as a user is a) sudo eject /dev/sdX b) chgrp ipod /dev/sdX*; eject /dev/sdX now the chgrp is the cleanest idea if you ask me, however I can't get that to work with udev. If I tell it to change grp in a 10-ipod.rules script, the 50-udev.rules overwrite the group with 'disk'. If i do it as a 60-ipod.rules script the group is ipod, however the disk isn't a block device. It is now a character device with very different major minors. Obviously you can't do anything with it (fdisk/mount etc). Hm, I was just trying a chgrp (after udev created it, as disk obviosuly) to ipod and tried to eject it as a user, doesn't even work. I suppose the only way then to do it is as root (via sudo or other). I think the cleanest solution to this would be to fix eject. I've submitted a bug with a patch to eject that allows you to eject any device you have read-write permission to, the bug is #135229. Hi, all works fine here after I put the following line into /etc/udev/rules.d/51-local.rules: ACTION=="add", SUBSYSTEM=="block", KERNEL=="sd[a-z][0-9]", ATTRS{removable}=="1", GROUP="plugdev", MODE="0660" Obviously the user has to be in the plugev group (which he should be anyway on any HAL-enabled box). My gtkpod.eject file: #!/bin/bash umount "${1}" && eject "${1}" Kind regards Sebastian official way is to use HAL We should close this bug either way; it's from 2006. Any information here would be only relevant for archival purposes anyway. |