xfmountdev on FreeBSD

manny rosa manny_robot_freak at yahoo.com
Wed May 1 20:42:02 CEST 2002


> Message: 9
> Date: Wed, 01 May 2002 11:43:59 +0200
> From: Jasper Huijsmans <j.b.huijsmans at hetnet.nl>
> Subject: Re: xfmountdev on FreeBSD
> To: xfce at moongroup.com
> Reply-To: xfce at moongroup.com
> 
> Just out of curiosity, why don't you use /etc/fstab
> to allow users to mount 
> disks. That's much easier with mount execution
> permissions, isn't it?
> 
> Jasper
> 
> At 11:00 AM 5/1/02, you wrote:
> >On Tue, 30 Apr 2002 21:21:34 -0700 (PDT)
> >manny rosa <manny_robot_freak at yahoo.com> wrote:
> >
> > > Is it possible to have xfmountdev use specific
> > > arguments? For example, under FreeBSD, I have it
> setup
> > > so that users can mount filesystems (floppy and
> > > cdroms) on a mountpoint they own, like
> > > /home/me/floppy. This is the command I need to
> mount
> > > floppies
> > >
> > > mount -t msdos /dev/fd0 /home/me/floppy
> > >
> > > I know that under linux is the fstab is setup
> right
> > > it's a matter of mount /mnt/floppy. So my real
> > > question is... is it possible to send arguments
> to the
> > > mount command along with the mount point to
> > > xfmountdev?
> > > I'm running XFce 3.8.14.
> >
> >xfmountdev is a bash script; so if you want to you
> can alter it the way 
> >you like
> >at this moment it only looks for one parameter
> ($1), so the real awnser to 
> >your question:
> >no.

Actually, FreeBSD won't let users mount to a mount
point not owned by the user. So using a generic
mountpoint like /floppy wouln't work because only one
user can own a file. I tried letting users of a group
access the mountpoint but it won't work either.
FreeBSD docs recomment having each user have a mount
point, like /home/me/floppy. So the solution was to
modify the xfmountdev script. I changed it so that
arguments can be passed to "mount". So to mount on
FreeBSD, I use 

xfmountdev /home/emmanuel/floppy "-t msdos /dev/fd0"

Here's the patch (diff) file. The script also
continues to work with Linux seemlessly. Well, it
seems like it...
START

*** /usr/X11R6/bin/xfmountdev	Wed Jan 23 16:04:27 2002
--- floppy/xfmountdev	Wed May  1 14:02:18 2002
***************
*** 44,48 ****
                  shift
                  echo Mounting media...
!         	$MOUNTCMD "$MOUNTPNT" $*
                  echo Browsing media...
                  xftree "$MOUNTPNT"
--- 44,52 ----
                  shift
                  echo Mounting media...
! #		Emmanuel Rosa (2002)
! #		original mounting command
! #        	$MOUNTCMD "$MOUNTPNT" $* 
! #		new command (FreeBSD)
! 		$MOUNTCMD $* "$MOUNTPNT"
                  echo Browsing media...
                  xftree "$MOUNTPNT"

END

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com



More information about the Xfce mailing list