Unique names for UMS devices in /media/
Tom Eastman
tom.eastman at stonebow.otago.ac.nz
Sun Feb 18 22:02:01 UTC 2007
Jon wrote:
> Tom Eastman wrote:
>
>> I have several different USB Mass Storage devices (cameras, MP3 players,
>> memory sticks and removable hard drives). All of them are correctly
>> mounted in /media/ as 'usbdisk' or something similar.
>>
>> What I would like, though, is for each one to have its own directory
>> name. For example, my mp3 player to come up as '/media/iriver' and my
>> camera to come up as /media/fujifilm' or something like that.
>>
>> I know this can be done on some level, but I'm not sure how deep I have
>> to go. Whether it's something to do with HAL, or udev, or somewhere else.
>
> There's a tool called "PyGTK Storage Device Manager" available as pysdm
> in the universe repository which does exactly this. It provides a GUI
> for udev rules - allows you to match a device by name, model, vendor or
> bus and perform actions such as creating a link with a specified name
> when the matching device appears.
>
> Screenshots at http://pysdm.sourceforge.net/ (although they don't show
> the rule definition dialog) or just 'apt-get install pysdm' and take a
> look yourself.
>
> Having said that, some of my devices seem to mount with sensible names
> by themselves - some do, some don't. Maybe it's something I setup a
> while back but I've forgotten about... nothing appears in /etc/fstab
> though and I know I've never learnt to write udev rules.
>
> Jon
>
Thanks guys, it turns out that just having descriptive filesystem labels
is a good place to start :-) Although I'll also have to check out this
PySDM thingee too.
Cheers!
Tom
More information about the ubuntu-users
mailing list