You are not logged in.
Gome seems to do something when handling external hard-disks or usb-pens.
When using gnome (right-click on drive/disk image on desktop) and do a 'safely remove drive' on any mounted or even not mounted devices, these actually 'turn off'. My hard-disk spins down, and my usb-pen's little led goes out. Which is great, and the way it should be.
I'm now wondering what gnome 'actually does' there, and why/or if there is a way to incorporate this into other 'lightweight' DEs, or just a custom script for managing media.
Any ideas?
Last edited by hungerfish (2010-01-10 04:10:36)
Beetles and bacteria are vastly more successful than humans in terms of survival.
Offline
I believe gnome does that since gnome-disk-utility switched to devicekit-disks.
This might help you:
http://hal.freedesktop.org/docs/DeviceK … sks.1.html
Especially that looks useful
--detach device_file [--detach-options options ]
Detaches (e.g. powering down the physical port the device is connected to) the device represented by device_file using a comma-separated list of options.
[pidgin-knotify] Native KDE notifications for pidgin - [series60-remote] Manage your Symbian S60 phone
Offline
Ah, it's not simply an unmount? Have never noticed =p since I pull them out/manually switch them off anyway. It did not use to behave this way...
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
This was discussed a while back (I think .... can't find the thread) and I think someone even posted a script to do it from the cli, something like sumount (special umount) /dev/whatever and it would check if it was usb and if yes, unmount it and then power it off.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
To power off my usb drive I use
#sdparm --command=stop /dev/sd[whatever]
after umounting.
...is it any different from the devicekit solution?
Offline
Hey, following worked for me:
devkit-disks --detach /dev/sdc
Thanks for the tip! I'm sorry for the late reply, but I got hit by a very lousy cold and was unable to respond Better now though...
@xenofungus, that code of yours does nothing
Beetles and bacteria are vastly more successful than humans in terms of survival.
Offline