thunar-volman not mountig dirves at begining whn slim manager is loaded

Kevin Chadwick ma1l1ists at yahoo.co.uk
Fri Jun 8 12:36:00 CEST 2012


On Thu, 7 Jun 2012 15:41:29 -0700 (PDT)
sergiocmailbox-xfce at yahoo.com.br wrote:

> As I said in another post, I don't really need auto-mounting for my daily use, but if you don't mind sharing how you do it, I'll like to know.

 Quite crude (in a hurry) but works for many desktops and can be 
 easily adapted for cross platform, it will need a little
 work for multiuser or systems with multiple permanent 
 drives and certainly for any project, but you get the idea.

If you look up the spacefm devs blog you'll find some daemons for various things too.


/bin/cat /etc/udev/rules.d/*
ACTION=="add", KERNEL=="sd[b-z]", RUN+="/bin/su _fixmount -c '/bin/sh /usr/local/mybin/fixmount.sh'", OPTIONS=="last_rule"
ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/su _fixmount -c '/bin/sh /usr/local/mybin/fixmount.sh'", OPTIONS=="last_rule"
ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/su _fixmount -c '/bin/sh /usr/local/mybin/fixunmount.sh'", OPTIONS=="last_rule"
ACTION=="remove", KERNEL=="sd[b-z]", RUN+="/bin/su _fixmount -c '/bin/sh /usr/local/mybin/fixunmount.sh'", OPTIONS=="last_rule"


/bin/cat /usr/local/mybin/fixmount.sh
#!/bin/sh
BOB=$(/usr/bin/grep bob /etc/passwd | /usr/bin/cut -d ":" -f "3")
#Order sequentially, gives device type matchable to order of plugged in on one nautilus interface without really long or dumb filesystem labels causing problems
DEV="0"
until ! /bin/mount | /usr/bin/grep -q /media/usb"$DEV"
do
let DEV=$DEV+1
done
FS_OPTIONS="rw,nodev,nosuid,noexec"
FILESYS=$(/usr/bin/sudo /sbin/blkid -c /dev/null -o export "${DEVNAME}" | /usr/bin/egrep ^TYPE | /usr/bin/cut -d "=" -f 2)
case $FILESYS in
fat) FS_OPTIONS="rw,nodev,nosuid,noexec,flush,uid=oesys,umask=027" ;;
vfat) FS_OPTIONS="rw,nodev,nosuid,noexec,flush,uid=oesys,umask=027" ;;
ntfs) FS_OPTIONS="rw,nodev,nosuid,noexec,uid=oesys,umask=027,windows_names,streams_interface=none" ;;
ext2) FS_OPTIONS="rw,nodev,nosuid,noexec,resuid=$OESYS"  ;;
ext3) FS_OPTIONS="rw,nodev,nosuid,noexec,resuid=$OESYS,barrier=1,commit=2"  ;;
ext4) FS_OPTIONS="rw,nodev,nosuid,noexec,resuid=$OESYS,commit=2,journal_checksum"  ;;
esac
/usr/bin/sudo /bin/mount -n -o "$FS_OPTIONS" "${DEVNAME}" /media/usb"$DEV"


More information about the Xfce mailing list