LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 12-01-2006, 12:29 PM   #1
hbquikcomjamesl
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
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.

--
JHHL
 
Old 12-02-2006, 05:19 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
The icons are defined in the nautilus theme.

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?

RH8 is pretty old...
 
Old 12-04-2006, 11:47 AM   #3
hbquikcomjamesl
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Simon Bridge
The icons are defined in the nautilus theme.

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.

--
JHHL
 
Old 12-06-2006, 10:31 PM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Have you looked in: /usr/share/icons

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 10:36 PM.
 
Old 12-07-2006, 09:51 AM   #5
hbquikcomjamesl
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Original Poster
Rep: Reputation: 0
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.

--
JHHL
 
  


Reply

Tags
icons, nautilus


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nautilus + slow access to mounted drives ScottReed Slackware 2 02-10-2011 02:41 PM
How do I access a mounted volume? royeo Linux - Newbie 2 07-19-2006 02:51 PM
How to assign an icon to an application? anupamsr Linux - Newbie 4 11-06-2005 07:18 AM
Getting CD Volume name of mounted images Darkvater Linux - Software 3 03-16-2005 12:58 PM
Nautilus was unable to mount the selected volume. gazza Linux - Software 1 01-14-2004 02:27 PM


All times are GMT -5. The time now is 04:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration