[ale] USB pen drive killed?

Sean Kilpatrick kilpatms at mindspring.com
Wed Nov 12 20:34:23 EST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 12 November 2003 10:18 am, Pete Hardie wrote:
 Michael D. Hirsch wrote:

 > If you are using mandrake, you should make the pendrive use
 > supermount--then you should be able to put it in and pull it
 > out with impunity.  Just look in /etc/fstab for how the cdrom
 > is set up, then imitate it for your pen drive.  
 > Never use mount/umount again!
 
| Sounds cool.  Does RH have anything similar?  I've looked into
| hotplug, but it was heavy slogging for that documentation, and I
| never found anything that looked like a step-by-step list of
| procedures - just a lot of references to USB vendor data.


Yes, but you have to work at it a bit.

Here's how to create an automount icon for the KDE desktop:

1. you are going to have to add a line to fstab, if it isn't 
already there. Mine looks like this -- all on one line:


/dev/sda1  /mnt/widget   vfat    
noauto,owner,nodev,gid=users,uid=nobody,quiet,umask=2 0 0

The OS recognizes my pen drive (which I call widget) as <sda1>
and you will have to determine where yours shows up, probably 
sda<something>.

I created the directory /mnt/widget.  You might prefer /mnt/pendrive
Whatever.

2. then take a look at /etc/auto.misc and (as root) add the
appropriate line to that file.  Mine looks like this:

widget	-fstype=auto,nosuid,nodev,noexec,gid=users,uid=nobody,umask=2	
:/dev/sda1   [NOTE: there must be whitespace between the options list
and the address beginning with the ":"  Also note that the "widget"
is the NAME of the device.  That could be Bob, or Daniel, or pendrive --
anything you like.

3.  Now right click on the KDE desktop, then >Create New > Link to
application. Open the "Execute" tab and add this line to the command
block:  kfmclient openProfile filemanagement file:///misc/*
You might want to cut and paste that line as spacing and capitalization
are critical. Then replace the "*" with the "name" of the device as
specified in /etc/auto.misc  In the example above the "name" is 
"widget"

4.  Only one small, tricky bit left. The standard delay on unmounting
a file system is 5 minutes or  300 seconds and I assume you don't want 
to wait that long. So, as root, open in an editor /etc/auto.master
and look for a line like this:
   </misc     /etc/auto.misc>

edit that line so it looks like this:

   /misc     /etc/auto.misc  --timeout=1     [that's two spaces between
the .misc and the --]

That will cut the delay on unmounting the file  system to one second.

All that's left is replacing the stock icon. Right click on the icon
and open the Properties dialog box and click on the icon as shown in
the dialog box. That will bring up a list of icons. Pick one.

You're done. Next time, plug in the pendrive and click on your desktop
icon. You should have access to the drive. Just remember to CLOSE the
window (and thereby unmount the drive) BEFORE unplugging the thing.

Hope this helps.

Sean

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/st7l73hVp4UeGJERAhHwAKCWTp2zf0Df5eam81BfyNN5dlnrywCdGyXm
uiKIUV4axzctTcWUS/amHuU=
=5mKV
-----END PGP SIGNATURE-----



More information about the Ale mailing list