How does Nautilus know which icon to assign to a mounted volume?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How does Nautilus know which icon to assign to a mounted volume?
How does Nautilus know to assign "i-floppy.png" to floppy disk volumes, and "i-blockdev.png" for hard disk volumes, and the corresponding icons for ZIP and JAZ volumes? (Note, these are the icon names as used on the "Dummies Book" edition of RH8.)
Can it be taught to know the difference between a 3 1/2" floppy disk in fd0, and a 5 1/4" floppy disk in fd1? Between a hard drive and a flash device?
I'd do a text search for "i-blockdev" over the entire system, attempting to find it in some configuration file somewhere, but I have yet to find a way to do a system-wide text search in Linux.
I notice that if I want to associate a different icon with a removeable media, I just make a custom selection as normal and it sticks.
Though I recall from RH9 days, this didn't used to happen (remove and insert the media results in the default icon reappearing). A possible reult of udev?
I notice that if I want to associate a different icon with a removeable media, I just make a custom selection as normal and it sticks.
Though I recall from RH9 days, this didn't used to happen (remove and insert the media results in the default icon reappearing). A possible reult of udev?
Given my experiences with the custom icons on my DOS volumes "sticking" if left constantly mounted, but reverting to default icons if unmounted and remounted, I had no reason to expect flash devices to behave any differently, and indeed, I ran a quick test on a CF card, and it does indeed revert to the default icon if unmounted and remounted.
So far, nothing I've found that's recognizable as a theme file refers to "i-blockdev" or "i-floppy" or "i-cdrom" or "i-<whatever>," or differentiates between different device types, but at this point, I don't even know what haystack my needle is in.
You are looking for the wrong names. For eg. in the Human (usr/share/icons/Human/scalable/devices) theme, the icons are called
USB Drive "gnome-dev-removeable-usb.svg"
Floppy Disk "gnome-dev-floppy.svg"
... like that.
The various themes seem to be able to inherit each others icons - the gnome and clearlooks themes are common sources.
You gotta look.
For eg.
i-blockdev in gnome is at
/usr/share/icons/gnome/48x48/filesystems/gnome-fs-blockdev.png
i-floppy
/usr/share/icons/gnome/48x48/devices/gnome-dev-floppy.png
... you get the idea?
Last edited by Simon Bridge; 12-06-2006 at 09:36 PM.
Uh, you are completely missing the thrust of my question.
1. This is Red Hat 8. Running Nautilus 2.0.6. The latest copyright date in the Nautilus "About" window is 2001.
2. I know empirically that the icons in use, when a volume is mounted on the desktop, by right-clicking on the desktop are in /usr/share/pixmaps/nautilus/<theme>, and that the ones being used are i-blockdev.png, i-floppy.png, i-cdrom.png, and i-zipdisk.png, in that directory. It is also specifically ignoring i-harddisk.png, in that same directory.
3. I also know that Nautilus is getting these icon names from somewhere, and it's definitely NOT from <theme>.xml in that directory.
My goal is not to find and change the icons Nautilus is already using. I can already do that at will, and have done so. My goal is to, assuming it's possible with this old a release of Nautilus without recompiling to change something hardcoded in the source, determine how it is already recognizing that a cd-rom or a ZIP disk is different from a generic "block device," and expand up on that, so it differentiates between a 3 1/2" floppy and a 5 1/4" floppy, and between a hard drive and a removable flash device. Assuming that "i-blockdev.png" and so forth are not hardcoded in the source, they must be listed in a file somewhere. But I don't even know which haystack my needle is in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.