Xfce-4.4.3 and FBSD-7.1 USB Stick Help

Ken Gunderson kgunders at teamcool.net
Fri Jan 30 00:10:38 CET 2009


On Thu, 2009-01-29 at 21:23 +0100, Alexander Toresson wrote:
> On Thu, Jan 29, 2009 at 8:27 PM, Ken Gunderson <kgunders at teamcool.net> wrote:
> > Greets All:
> >
> > I've been away from FBSD and Xfce for a bit but am bringing up a
> > fbsd-7.1 and xfce-4.4.3 box for my kids to use and need for them to be
> > able to have +/- no brainer ability to share USB sticks with Winblows
> > machines as mortal users.  I'm old dog w/limited experience with USB
> > sticks and simply su'd up to root when necessary.  I've followed FBSD
> > handbook instructions w.r.t. devfs.rules and sysctl.conf changes
> > outlined here:
> >
> > <http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html>
> >
> > Xcfe sees the USB stick when I plug it in but I'm unable to mount it as
> > non-root user.  From /var/log/messages:
> >
> >
> >> Jan 29 12:04:05 athena root: Unknown USB device: vendor 0x05dc product 0xa710 bus uhub0
> >> Jan 29 12:04:05 athena kernel: umass0: <Crucial Gizmo! Plus, class 0/0, rev 2.00/11.00, addr 2> on uhub0
> >> Jan 29 12:04:06 athena kernel: da0 at umass-sim0 bus 0 target 0 lun 0
> >> Jan 29 12:04:06 athena kernel: da0: <Crucial Gizmo! Plus 1100> Removable Direct Access SCSI-0 device
> >> Jan 29 12:04:06 athena kernel: da0: 1.000MB/s transfers
> >> Jan 29 12:04:06 athena kernel: da0: 956MB (1957888 512 byte sectors: 64H 32S/T 956C)
> >> Jan 29 12:04:19 athena console-kit-daemon[836]: GLib-CRITICAL: g_hash_table_lookup: assertion `hash_table != NULL' failed
> >> Jan 29 12:04:19 athena console-kit-daemon[836]: GLib-CRITICAL: g_hash_table_destroy: assertion `hash_table != NULL' failed
> >
> > Any help ironing this out would be much appreciated.
> >
> > On related note, I recently brought up KDE4, Gnome, and Xfce4 and turned
> > the kids loose to explore for a couple days.  Posted some of their
> > thoughts at LQ DE of the year polls here:
> >
> > <http://www.linuxquestions.org/questions/2008-linuxquestions.org-members-choice-awards-83/desktop-environment-of-the-year-695620/page3.html#post3421995>
> >
> >
> > TIA-- Ken
> >
> > --
> > Ken Gunderson <kgunders at teamcool.net>
> >
> 
> You need to enable the user to mount pluggable partitions with hal.
> How this is done is distro-specific, tho it's usually done through
> groups. On at least some distros the group in question is plugdev.
> Take a look at /etc/dbus-1/system.d/hal.conf to see what your hal
> policy is.

To elaborate on initial post:

Before posting I had created the group "usb" and added mortal users to
it.

/etc/devfs.rules spec that devices /dev/da*s* gets mounted thusly:

[localrules=10]
add path 'da*s*' mode 0660 group usb

/etc/sysctl.conf allows users to u/mount drives (yikes!):

vfs.usermount=1

This resulted in mortal users being able to mount the usb stick from command line, e.g.:

mount -t msdosfs /dev/da0s1 ./usbtest/


Once this is done Thunar can browse ./usbtest no problem.  The problem
I'm having is getting Thunar to mount the usb stick.

>From what you've indicated, I need to torture hal.conf but I think FBSD
preferred mechanism is to use PolicyKit instead.  I'd read the Xfce
"Help" on thunar-volman but didn't quite grok wtf I needed to tweak.
After your cluebat and some head scratching I added the following
to /usr/local/etc/PolicyKit/PolicyKit.conf:

<match action="org.freedesktop.hal.storage.mount-removable">
    <match user="memyselfandi">
        <return result="yes"/>
    </match>
</match>

Which now let Thunar mount & browse the USB stick but Thunar was still
unable to unmount.  So.. I nuked the devfs.rules and sysctl.conf changes
recommended by FBSD handbook and could subsequently umount the stick.
Rebooting and re-enabling them again and I this time could both u/mount
the stick.  Go figure.  Hal seems much better way to do it though,
particularly for lower tech users.
 
I'm not sure if above solution is how one is "supposed" to handle the
issue in FBSD but it seems to get the job done.  

Anyhow, thanks for helping an old *nix dog learn some new tricks.  Much
obliged ;-)

-- 
Ken Gunderson <kgunders at teamcool.net>




More information about the Xfce mailing list