Date: Tue, 4 Apr 2006 13:45:47 +0200 From: Stefan Sperling <stsp@stsp.in-berlin.de> To: Joe Marcus Clarke <marcus@FreeBSD.org> Cc: hackers@freebsd.org Subject: Re: RFC: Adding a ``user'' mount option Message-ID: <20060404114547.GA1613@dice.stsp.lan> In-Reply-To: <1144133238.9725.32.camel@shumai.marcuscom.com> References: <1144042356.824.16.camel@shumai.marcuscom.com> <4430BA79.2030403@freebsd.org> <44316387.1090609@FreeBSD.org> <44321277.7040904@FreeBSD.org> <1144133238.9725.32.camel@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 04, 2006 at 02:47:18AM -0400, Joe Marcus Clarke wrote: > On Tue, 2006-04-04 at 08:30 +0200, Alex Dupre wrote: > > Joe Marcus Clarke wrote: > > > What I'd like to achieve is a simple out-of-the-box way of mounting > > > media such as CDs, and floppy disks without users necessarily needing to > > > know about sysctl. While I can't speak for KDE, I know GNOME already > > > has the ability to detect user-mountable media, and gives the users > > > icons on the desktop to mount said volumes. > > > > I don't know what exactly you mean with 'detect user-mountable media', > > but a KDE user may have desktop icons for every device/fs listed in > > /etc/fstab. I assume GNOME works in a similar way. And clicking on the > > icon of course will mount the media with the 'mount' command. KDE also > > monitor changes to the fstab file and can open a dialog window when a > > new media appears, but since the fstab file is not automatically updated > > on FreeBSD (I don't know how it works exactly on Linux) this feature is > > quite useless. > > GNOME works in a similar fashion. Currently if vfs.usermount=1, FreeBSD > scans the fstab list, and if the mount point is owned by the current > user, it adds an icon for it. Why do GNOME/KDE rely on /etc/fstab on FreeBSD? What are admins supposed to do on systems with more than, say, a hundred users. Having to add a line to /etc/fstab for every user is of course scriptable, but that does not make it less insane. As far as I got it, the current design boils down to the user creating a mount point, and then mounting the media "manually", e.g. mount /dev/cd0 ~/cdrom. Granted the admin has set vfs.usermount to 1, of course. I don't really think that user mount has been designed with /etc/fstab in mind. So why not have GNOME/KDE create mount points for the user if vfs.usermount is 1? Since FreeBSD uses devfs, every device in /dev that usually represents a device with removable media can assumed to be present in hardware. GNOME/KDE could be patched to create mount points somewhere in the user's home directory, and issue a 'mount device mount_point' instead of 'mount mount_point' if the user clicks the device icon. This still requires novice home desktop users to set vfs.usermount to 1 though, so it's not a perfect solution. But it prevents having another suid binary just for convinience, and is suitable for large multi user installations. > For dynamic updates, Linux has mtab. For FreeBSD (in GNOME, that is), > we just periodically check for changes in the list of available file > systems. Where? In /etc/fstab or /dev ? -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060404114547.GA1613>