Question about adding devices with automount.

Stef Bon stef at bononline.nl
Wed Apr 8 09:57:04 BST 2009


Hello,

I've been working on a construction which adds an autofs managed 
mountpoint to the homedirectory, when:
a. an usb device or more than one is detected when logging in
b. an usb device is plugged in during a session

This looks like:

/home/sbon/Connections

is the base directory for all kinds of connections (network, all kind of 
hardware)
Earlier I've been working on a construction to create a browseable 
network map here, also with autofs.
Network resources like SMB shares, FTP servers and SSH access is 
possible. (SMB via cifs, FTP via curlftpfs/FUSE, SSH via sshfs/FUSE). 
Access to Novell networks should also be possible.

Now about devices. When I add a device during my session, the (virtual) 
directory Devices is added, and therein my USB stick:

/home/sbon/Connections/Devices/USB_DISK_Pro

Other devices should also appear in this directory.
I do not have published this yet anywhere, but it is simular to the one 
you can find here:

http://www.gentoo-wiki.info/Autofs#UDEV_with_autofs

The big difference with my construction is that the mountpoint is *in* 
the users homedirectory, not in /media: direct accessible for users from 
their homedirectory, where going to a "foreign" place like /media is not 
that userfriendly.

Now when mounted this is detected correctly by dolphin. In the "places" 
sidebar the pictogram for the device says it is mounted, and when I 
click on it it goes to the right directory, in this case:

/home/sbon/Connections/Devices/USB_DISK_Pro

But when it's not mounted (this can of course happen when using autofs: 
this construction doe not mount it when it's detected, and when mounted, 
it gets unmounted when not used for some time)  clicking on the USB 
pictogram mounts it at  /media/USB.
Now here goes something wrong! Dolphin falls back to it's default behaviour.

Is it an idea/possible to configure the way devices are detected?
To start: disableing the default detection of devices by dolpin

I can add a pictogram to the places bar myself, pointing to this 
directory (thus in:/home/sbon/Connections/Devices/USB_DISK_Pro), but 
this is always on my sidebar, also when the device is not plugged in.
Also it doesn't show any information it's mounted or not.

Futher it would be very nice to have a wizard popup when a device is 
added which is not formatted.
Note also the difference between the name Dolphin is using(USB), and 
mine (USB_DISK_Pro). The first is (I'm not sure)
the label (ID_FS_LABEL_ENC) where I'm using the modelname (ID_MODEL). It 
would be very nice also to configure the name this device is given. It 
should here be very easy to let the user give their own name to the 
device, and remember this for any next time, by creating a table mapping 
the devices name to the uuid.

Stef Bon



 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde/attachments/20090408/64f4e569/attachment.htm>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list