How to unmount busy usb?

I get error message from HAL if I try to unmount a usb drive if its contents are being displayed in Dolphin file manager. In order to unmount, I have to display something other than usb contents, click on usb icon in dolphin and select unmount in a pop up menu. Is there a way I can unmount the usb without displaying other content? It's possible on linux. Is this a polkit, policykit or some other configuration issue?
 
I get error message from HAL if I try to unmount a usb drive if its contents are being displayed in Dolphin file manager.

It's busy because you're looking at something on that drive. You have to close any documents you were looking at on it before it will unmount. Copy them to the HDD if you need to work with them.
 
If you‘re in a desktop environment that uses gvfs, gvfs-trash is a common candidate. From my experience a simple pkill gvfs-trash often does the trick without further investigating with e.g. fstat
 
When you come from a Linux environment, you'll have to get used to a more strict implementation in FreeBSD. In the beginning it might be confusing, but (in this case) you can't put a book back on the shelf while looking at the content.

And it also protects you from double clicking a file on an unmounted volume.
 
Thanks for your replies. Having to close anything being displayed before unmounting is a small issue. I will continue to do so.
 
Having to close anything being displayed before unmounting is a small issue.
In Dolphin, you can just back up one directory or go anywhere else other than the device in question.

Edit: Oops! My bad. :( I just checked and it seems I'm wrong about that. I guess Dolphin keeps a grip on it regardless of whether you're reading the device or not. I had to actually exit Dolphin before I could unmount the device.
 
OJ, I do exactly what you said and I can unmount. I should mention that I have automount for removeable devices turned on in system settings. Usually, the device notifier will indicate that it is safe to remove the device. To see it, I click on the icon on bottom right of the panel that looks like a usb drive. I can unmount by clicking on down arrows that appear in this pop up. Sometimes dolphin will also display a message saying it's safe to remove the device, sometimes not. In dolphin, if I right click on the device after unmounting it I can tell from the pop up if it was unmounted. If it was, it will give the option to mount.

I'm still looking into other ideas: automount, policykit polkit, etc. I suspect that there is a way to make dolphin let go when you unmount . . . even if the device's contents are still being displayed. I solved another problem recently with polkit involving changing the background image for the log in screen. I can now change it easily without being root. I feel that I need to learn more about polkit anyway.
 
I have resolved to replace dolphin with caja. I have made it the default file manager in system settings. Now everything works as I want it to. It would be nice if Dolphin was fixed to allow this. Maybe in the future. Till then caja works perfectly.
 
Back
Top