[NBLUG/talk] Hotplug for Linux novices

Lincoln Peters sampln at sbcglobal.net
Fri Jul 29 14:27:36 PDT 2005


I'd like to set up a Linux box (Debian/Sarge) so that it automatically
creates and removes mount points, fstab entries, and desktop shortcuts
(using KDE) for storage devices as they become available.  Thus, if I
was to plug in a USB flash drive:

1. A new mount point would be created, preferably with a name based on
the type of device, as might be reported by "lsusb"
(e.g. /media/Cruzer).

2. An appropriate entry would be added to the fstab.

3. A desktop shortcut would be created on the KDE desktop for any user
who might be logged in (it's OK if shortcuts are created for users even
if they aren't logged in; I don't foresee having enough users that that
would cause a performance issue).


This procedure would be reversed when a device is disconnected (remove
from desktop, remove from fstab, remove mount point).

I do NOT need the newly-available device to be automatically mounted; I
just want to set this computer up so that a new device automatically
appears on the desktop when it becomes available (i.e. it needs to work
for a Linux novice).


I'm pretty sure that this is possible, but I can't seem to figure out
how to set it up.

---
Lincoln Peters
<sampln at sbcglobal.net>

We question most of the mantras around here periodically, in case
you hadn't noticed.  :-)
             -- Larry Wall in <199705101952.MAA00756 at wall.org>




More information about the talk mailing list