You are not logged in.

#1 2010-01-03 07:18:42

hungerfish
Member
Registered: 2009-09-13
Posts: 254

gnome's 'safely remove hardware' option[SOLVED]

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. roll

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

#2 2010-01-03 11:06:45

janboe
Member
From: Germany
Registered: 2007-08-09
Posts: 12

Re: gnome's 'safely remove hardware' option[SOLVED]

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

#3 2010-01-03 11:08:44

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: gnome's 'safely remove hardware' option[SOLVED]

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

#4 2010-01-03 12:13:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: gnome's 'safely remove hardware' option[SOLVED]

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

#5 2010-01-03 17:13:45

xenofungus
Member
From: Spain
Registered: 2009-10-17
Posts: 63

Re: gnome's 'safely remove hardware' option[SOLVED]

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

#6 2010-01-10 04:10:15

hungerfish
Member
Registered: 2009-09-13
Posts: 254

Re: gnome's 'safely remove hardware' option[SOLVED]

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 sad Better now though... smile

@xenofungus, that code of yours does nothing  hmm


Beetles and bacteria are vastly more successful than humans in terms of survival.

Offline

Board footer

Powered by FluxBB