GNOME Bugzilla – Bug 574566
Handling of automounted media after user logs out
Last modified: 2012-09-17 20:43:11 UTC
Please describe the problem: When a user logs out after some removable media have been automounted, they cannot be unmounted by other users logged in. Note that I have applied the fix to http://bugzilla.gnome.org/show_bug.cgi?id=573577 to the Debian experimental package Steps to reproduce: 1. User 1 has an active session and inserts a removable media 2. the removable media is automounted and user 1 gets the ownership 3. User 2 logs in and switch to his session using eg. f-u-s-a 4. User 1 returns to his session and logs out Actual results: Removable media are still mounted in user 2 session but cannot be unmounted Expected results: Not sure of what is expected. Unmounting the removable media when user 1 log out is to be excluded as user 2 could be working on files present on these removable media. Ownership should hence be passed to another user. The question is to which user (in case more than 2 users are involved)? A Debian user proposed that the user loggin out gets asked to whom he wants the ownership to be passed. I don't know if that's a workable solution but have no other idea. Does this happen every time? Yes Other information: It is very important to solve this as it renders user switching almost useless when removable media are involved.
With DeviceKit-disks (the replacement for HAL), there's a way to unmount filesystems mounted by other users. It requires some extra privilege (using PolicyKit, typically asks for the root password). Also, with GNOME 2.28, we will switch to DeviceKit-disks as the default backend for GVfs. So with GNOME 2.28 this should be a lot easier. (That said, I wonder... is passing ownership really that important? I mean, f-u-s is pretty rare in the first case; it's even more rare to use removable media when doing it.) Regarding unmounting on log-out, this need to be handled at the system level; we simply cannot rely on the session doing this itself. I will probably make DeviceKit-disks do this... (I'll follow up with a bug reference to the DeviceKit-disks bug tracker).
Here's the DeviceKit-disks bug http://bugs.freedesktop.org/show_bug.cgi?id=20691
As David says, I don't think there is a nautilus bug here. Cleaning up the session mounts on logout seems like the right approach to me.