LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   usb automounting (http://www.linuxquestions.org/questions/slackware-14/usb-automounting-177729/)

wi_slacker 05-04-2004 09:57 AM

usb automounting
 
If I mount -a as root, icons for my flash drive and camera appear on my desktop (gnome 2.4). They are both writeable to regular users becuase I have umask=000 for each in /etc/fstab.

I'd like these icons to appear as soon as the device is plugged in. su-ing to root each time I plug one in is a pain, and unnecessary in my opinion. Is there a way to get around this?

hamish 05-04-2004 10:03 AM

Hey.

you don' thave to type "mount -a" inorder to mount things, nor do you have to be root.

As a normal user, you can mount stuff by typing:

$mount <mount-point>

For example, you might be mounting a camera in /mnt/camera, therefore, you would do:

$mount /mnt/camera

and you can unmount by doing
$umount /mnt/camera

In fstab, just make sure that you have "user" written in the options for those devices. It might not work unless this is specified

Hope this helps.

Hamish

wi_slacker 05-04-2004 10:25 AM

yes that does help. Still though, if my gf wants to see the pics she just took w/ the camera, and I tell her she has to "open a shell and mount /mnt/camera", she won't be very impressed.

I'm pretty sure SuSE can automatically mount devices when they are plugged in. That is my goal here.

If I have to, I could write a script to pull the pics off the camera and put them in a folder, but I think the automounter would be much cooler.

Ipolit 05-04-2004 10:43 AM

it's easy for your gf to do it in gnome
just push the right mouse button, choose disks and you'll see your devices marked in fstab with noauto option. choose the one you want to mount and it's already mounted

hamish 05-04-2004 11:09 AM

Totally.

My girlfriend is slowly becoming geeky-er (not really I word I guess), but I set an alias in command line so that she just has to type "usb" and her usb drive mounts. Also, I added an echo into that so that it says hello to her when it mounts....it makes her appreciate linux even more!!!

Hamish

aaa 05-04-2004 11:19 AM

See this:
http://www.buberel.org/linux/usb-automounter.php

Schrambo 05-05-2004 12:30 AM

What about creating a Launcher icon to the Icon Panel in Gnome?

I've done this for my optical drives and USB and works beaut. All you gotta do is put in
Code:

mount <mountpoint>
In the command text line, choose a pretty icon and your set to go. (providing that you have created the /etc/fstab entry. Remember to put "auto" in the usb mount options to make it pop up on her desktop.


All times are GMT -5. The time now is 11:27 AM.