Auto Mounting USB Sticks and CD's

Predrag Punosevac punosevac at math.arizona.edu
Fri Mar 28 00:15:22 PDT 2008


Norberto Meijome wrote:
> On Fri, 28 Mar 2008 01:22:55 -0500
> "Sam Fourman Jr." <sfourman at gmail.com> wrote:
>
>   
>> Hello,
>>
>> I have a FreeBSD 7.0 install, and I am running the Gnome Desktop (2.22)
>> I was hoping that someone had a nice HOWTO or could paste their config files.
>> I want my usb sticks to auto mount when I insert them like they do on PC-BSD
>>     
>
> not sure how Gnome does it, but I would imagine it uses hald for it. u may have it installed already ( man pkg_info if u don't know ;) ).
>
> u need to add this to your rc.conf to have it all running on startup
>
> hald_enable="YES"
> polkitd_enable="YES"
> dbus_enable="YES"
>
>   


The HALD needs to be started in the specific order as

# enable HALd
dbus_enable="YES"
polkitd_enable="YES"
hald_enable="YES"


/etc/fstab needs to be edited

/dev/cd0     /usr/home/Pedja/mnt/cdrom cd9660   rw, noauto      0       0
/dev/acd0    /usr/home/Pedja/mnt/cdrom cd9660   rw, noauto      0       0
/dev/fd0     /usr/home/Pedja/mnt/floppy msdosfs rw, noauto      0       0
/dev/ugen0     /usr/home/Pedja/mnt/camera msdosfs rw, noauto      0       0


/etc/devfs.conf neets to be edited

# Allow all users to mount the floppy disk.
own       /dev/fd0    root:operator
perm      /dev/fd0    0666

# Allow members of the group operator to mount CD-ROMs.

perm      /dev/acd0   0666
perm      /dev/cd0    0666

# Commonly used by many ports  
link  cd0 cdrom
link  cd0  dvd
link  cd0  rdvd

link  acd0 cdrom
link  acd0 dvd
link  acd0 rdvd


# Misc other devices

perm    cdrom   0666
perm    dvd     0666
perm    rdvd    0666
perm    cd0     0666
perm    ata     0666
perm    xpt0    0666
perm    pass0   0666
perm    /dev/uscanner0 0666
perm    usb*      0666
perm    ulpt*     0666
perm    lpt0    0666 
perm    ugen*   0666

also you have to add in /etc/sysctl.conf

vfs.usermount=1
 


For USB stick also /etc/usbd.conf needs to be edited. I mount USB stick 
manually so figure out yourself.

Either read documentation or copy important files from PC-BSD.

>> I know that if I put gnome_enable in my /etc/rc.conf then it all works
>> BUT, I would prefer not to use gdm on bootup
>>     
>
> Kevin replied to this. I would just add, if you want some other login manager to run, (xdm, wdm), you'd have to install them and enable them in rc.conf
>
> If you follow Kevin's email by the letter, you'll have to log in to the text console and launch your X session manually.
>
>   
>> I also am having trouble trying to get k3b to burn CD''s without being root
>>     
>
> man devfs.conf
>
> _________________________
> {Beto|Norberto|Numard} Meijome
>
> "Everything should be made as simple as possible, but not simpler."
>   Albert Einstein
>
> I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>   



More information about the freebsd-questions mailing list