Re: Having Konqueror/kDesktop displaying media volume label
Dave Leigh <[email protected]>
| Newsgroups | gmane.comp.kde.look |
|---|---|
| Message-ID | <[email protected]> |
On Wednesday 17 April 2002 14:21, David Golden wrote: > On Wednesday 17 April 2002 15:25, Michel Alexandre Salim wrote: .. > /mnt/cdrom is the disk currently in the first cdrom drive, > /mnt/named/Pants is a disk currently attached to the system somehow, > anyhow, called "Pants". I do like this. I'm assuming that if the CD named "Pants" resides in the first cdrom drive, then it's equally accessible through both paths. It MIGHT be considered an underlying OS problem, but there's nothing to prevent KDE from enhancing what the OS gives you. In the short term, I just tried it manually and it can be scripted if you really wanted to do this today... It's not without a minor problem (addressed below). To do it, mounted as normal, then check the volume label with mlabel. If there's no label, then end. Otherwise, create a new directory under /mnt/named/ using the label that was extracted. Then call mount again, mounting it into the new location. To unmount, check the volume label. If a label is found then unmount /mnt/named/label and delete the directory, otherwise skip those two steps. Then unmount the device. Create a script for each removable device (or one parameterized script). Then create a .kdelnk file for each device and use your icons instead of those provided by KDE. Obviously this is something you'd want to have done more...ah... "professionally," either by KDE or by mount, but what's being asked is not terribly difficult. The only problem is what to do with the dynamically created directory in the event of a crash. I'd say, log the new directory name somewhere, and provide a script to read this log on startup, deleting any directories it finds there, then deleting the log entries. -- Dave Leigh, Consulting Systems Analyst Cratchit.org http://www.cratchit.org 864-427-7008 (direct) AIM or Yahoo!: leighdf MSN: [email protected] ICQ: 37839381 Hoping to goodness is not theologically sound. - Peanuts