[CentOS] USB, AutoMount & VNC

Guy Boisvert boisvert.guy at videotron.ca
Sat Mar 28 15:50:25 UTC 2009


Frank Thommen wrote:
> Guy Boisvert wrote:
>> Hi,
>>
>> 	It make senses if you're running a box headless (it will be headless 
>> soon, now i'm testing it with K+V+M attached).  We're using a CentOS box 
>> to plug USB Flash drive & external hard drive into it.  The CentOS box 
>> is then used to FTP the content of these external drives to a Winblows 
>> box, all that filtered by a firewall between the 2 boxes.  Only FTP is 
>> allowed.
>>
>> 	Doing some tests on the CentOS box, i saw that if i log into the 
>> console, then the local session and the remote VNC sessions will see the 
>> drives automounted.  If i log out of the console, then the VNC session 
>> won't see anything.  It's like the automount works only if somebody is 
>> logged at the console.
> 
> I assume that with "console" you mean X11/desktop manager.  In this case 
> Gnome or KDE handle the mounting of removable devices for you.  The 
> automounter hasn't anything to do with it.

Yes, X11/DM, logged locally on the "physical" console.  Thanks for the 
hint on automount.

> 
> If you want the automounter to handle removable devices, then you'll 
> have to add appropriate automounter map entries.  Something like
> 
> /etc/auto.master:
> /media /etc/auto.media
> 
> /etc/auto.media:
> usb    :/dev/sda1
> 
> 
> or you could use a program map like the following (not my invention, I 
> took this from the autofs mailing list):
> 
> -----
> #!/bin/sh
> if ntfs-3g.probe /dev/sda1; then
> 	echo "-fstype=ntfs-3g,other-opts :/dev/sda1"
> else
> 	echo "-fstype=vfat,other-opts :/dev/sda1"
> fi
> -----
> 
> You'll probably find other examples on the net.
> 
> I'm not sure if such an automounter setup collides with Gnome/KDE 
> automounting.
> 
> Cheers
> 
>      frank

Thanks for your help Frank.

The problem i have is that it won't necessarily be the same devices 
plugged to this box and the user could even plug many devices at the 
same time.

So i read many articles on the net but i'm kinda lost about where to 
start for this problem.

Anyway, i'm still reading an thanks again for your help!


Guy Boisvert, ing.
IngTegration inc.


More information about the CentOS mailing list