Orange dialog gone
August 23, 2009 —
BarryK
By popular demand, the "orange dialog box" is gone. Now, you click on a partition icon and Rox starts immediately. I added an item to the right-click menu to unmount all mounted partitions.
Automatic unmounting
I have been playing around with this. The idea is, if nothing is using a partition, why not automatically unmount it? The problem is, how to determine when nothing is using a partition.
I put some code into /sbin/pup_event_frontend_d to run 'fuser -v -m <mount point>' on the mounted partitions every 4 seconds. If no processes using the partition, run 'umount', if that fails kill all the zombie processes and run 'umount' again.
That works quite nicely, however it's not practical because a file open in a text editor, image editor, browser or whatever is not necessarily left 'open' so doesn't show up with fuser. So you may have a Rox window open, and a file open in a text editor, you close the Rox window, the partition then unmounts ...a bit rude.
I have left the auto-unmounting code in, with a checkbox in the Event Manager, disabled by default. Something to play with and think about the possibilities.
A more low-level approach is probably needed for auto-unmounting, using autofs, submount or something similar.
Comments
auto umountUsername: dogone
This is not my area of expertise, but could Puppy treat mounts with this option enabled as it does flash storage and cache writes? It would have to both permit/perform the umount and re-mount as/when needed. The user would have to understand the implications and resource (RAM) requirements, but it could perhaps work across most storage device types. Alternately, the option could be offered only on systems with a swap partition. Writes would be cached on the mounted swap part while all other parts are auto-unmounted (until the next "save"). I like the idea, especially from a [data] security standpoint. I generally unmount partitions when I'm finished with them.
Auto mount/unmount
Username: BarryK
"There is a forum thread that ecomoney started that is related to this topic: http://murga-linux.com/puppy/viewtopic.php?t=45630
Tags: woof