Re: [PATCH] close windows on unmount

Alexander Larsson wrote:
On Tue, 2004-03-09 at 12:31, Stefan Voelkel wrote:

On Tue, 2004-03-09 at 12:18, Alexander Larsson wrote:

You mean you want file manager windows to prevent unmounts. Why is that?

Because a shell does so too. Or do not close the window on unmount,
because then autofs windows get closed silently.

We have a software/document archive exported via NFS. I use the
automounter to mount this on demand. There are lots of files and folders
on this server, so I do have to open around 5 to 8 folders until I find
the file I want.

Now someone calls/comes over/whatever and distracts me. After some time
the automounter unmounts the server share and the nautilus window gets
closed. This is pretty anoying since I have to open a new window and
browse to the file again.

If the window stays open the automounter would silently mount the share if I use it again.

How about an option to disable this behaviour?

I can see your point for the automounter case. However, the more normal
case where a filemanager window prevents unmount in a bad way is for
removable media, when somewhere there is an open window on e.g the
floppy (possibly hidden by another window, workspace or whatever) and
you just *can't* get the damn floppy to unmount.

What about this approach:

When someone tries to unmount from the UI, we get the pre_unmount
signal. When this happens we close windows on the to-be-unmounted
filesystem, allowing you to unmount/eject floppies, usb cameras, etc.
However, on the real unmount signal we don't close any windows. This
means that if using FAM, the window will prevent non-ui unmount, and if
not using fam the automounter can unmount the fs, but the window will
still be there, and selecting a file in the window will cause it to be
mounted again.

Opinions on this approach?

Perfect, as far as automounter is concerned.
Don't know much about FAM, pre_unmount and such.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]