my question in short: How do I make sure, that files really finished copying, before i can securely remove the device, after it was automounted by udev. I don't want to use hal.
The whole story:
For mounting devices I just switched from hal to udev only and I like the faster bootup. Using die first rule in arch's udev-wiki works quite well for me. Since mounting manually isn't needed anymore, I'm able to and want to use a file manager that doesn't depend on hal. I also have a very lightweight system and my netbook thanks me for it. So file managers for daily use that are ruled out are at least nautilus, dolphin, thunar and pcmanfm. What I now need is a way to securely remove my usb devices, after I copied to them, to make sure the files are all save. How do I do that? Does udev support this?
I see two ways: either I find a file manager that allows unmounting without depending on hal, or I find a tool (maybe for the tray) that lets me unmount removable devices. Does anyone here have any idea how to solve this? Or is there any mistake from my side? Worst case is that I would always have to start a console and unmount the device manually. Is that really necessary?
This is my first posting of a new topic, so please be nice I hope this is the right place for this subject...
Last edited by fiinix (2010-07-18 03:09:56)
According to the mentioned wiki article, users cannot unmount devices which were mounted by udev, except with using 'pmount', see the section [...] support user un-mounting.
Your issues concerning a file manager: I don't use them myself nor am I aware of any application suiting your needs, but maybe you could set some user-defined actions and utilize 'pmount' to unmount.
Well, if I have to go to the terminal anyway, I think I would just use sudo with "fiinix mynetbook=NOPASSWD: /bin/mount,/bin/umount" in /etc/sudoers. Also, the mentioned pmount rule doesn't mount the partitions of my HDD immediately, like the first rule does. Didn't investigate it further, cause, like I said, it doesn't really matter in my case...
But you suggest that the file manager could be the place to look for it, offering a custom action. For my hal free system I found qtFM which has no dependencies except Qt (which I need anyway). I think that means I will ask there for such a feature. It really is a brilliant file manager
Still: I would really like to know, if there already is a program that would offer such a graphical unmount / custom action. Seems like this is more of a question for known software than a real issue... Anyone knows anything?
> graphical unmount
A script should do - you execute it by doubleclicking, some standard yes / no shows up ...
Last edited by karol (2010-07-18 07:23:14)
karol, thanks for the idea, but I don't have my desktop managed, hence no icons always at hand that I could execute. Also, what would they unmount? One icon for each possible /dev/sdXY?
Well, I noticed that qtFM, my file manager of choice, actually has a "Custom action" feature, so I can right click a mounted folder (which is also shown in the bookmarks section of the file manager) and click "Unmount" (that's what I called that action - for obvious reasons ). The confirmation of a successful unmount can be seen by opening that folder. If it is empty, it is either unmounted or there is nothing to lose anyway.
It's not a nice icon where I directly see if a device is mounted and can toggle the status like it was with hal and various file managers, but it's leightweight, graphical and safe. If anyone has any other way to do this and wants to share, please do so, but I will mark this as solved now. Thanks for the input!
Actually, that's what I meant :-) Scripts are small programs for performing custom actions .
Your input (picking the mounted folder) tells the script which folder to unmount, the script may show some graphical confirmation message; "/mnt/usb successfully unmounted".
Awesome! I could insert a few lines of code "myself" and make it show me a message about the result. I already have "sudo umount %f", where %f is the folder I chose. Now for the "I could insert ... myself" part: What would a code look like, that does about the following:
unmount. (got it so far, see above) if unmount == success: xmessage "successfully unmounted" if unmount == fail: xmessage "something went wrong"
More specifically: what is the code for arch to react on the result of an umount?
And: is there a less ugly version of xmessage? =)