5

Examples: special network share or flash drive,so I can easily identify them.

Ubuntu 11.04 Gnome Classic.

UPDATE: By "special network share" i mean network shares which are "permanently" mounted using the fstab e.g. in my case samba shares on my home server. I have one for music and one for other stuff.
It would be totally fine for me if the icon is on the share or drive and some (hidden) auto-loaded configuration file knows where it is.

3
  • If you just want to change the icon, e.g. of the Dropbox folder, you can right click it from nautilus and under the Basic tab, click in the folder icon and navigate to an image file of your choice.... I don't know if that'll work with removable devices, I ain't got none here.
    – henrique
    Jun 9, 2011 at 3:09
  • Would you mind elaborating more about what do you mean by "special network share"? Jun 9, 2011 at 6:21
  • 1
    @henrique: That "works". But when i change the icon of the desktop link it doesn't change in nautilus. And smaller "appearances" like in the panel or the nautilus sidebar don't change as well.
    – dAnjou
    Jun 9, 2011 at 9:29

3 Answers 3

1

There is a little trick that I learned from cleaning Windows viruses off people's flash drives that might just work for you.

If you create an autorun inf file with an icon linked inside, it will use that custom icon for the drive. Now, the one thing I can't help with (immediately) is the syntax (but I will update my answer later with an example).

I also am not sure if it will work on networks, but it will definitely work for removable media.


Edit (by George Edison): you can do this by creating a file named 'autorun.inf' in the root directory of the medium with the following contents:

[autorun]
icon=autorun.ico

...where 'autorun.ico' is the filename of an icon file relative to the 'autorun.inf' file.

1
  • This technique may work on Windows but Ubuntu (as of 20.04, Focal Fossa) does not seem to respect the autorun icon so far as I can tell from trying this Jul 19, 2022 at 15:26
0

I think you can just right click the icon, go to Properties> When properties window comes up, click on the icon in that window> Navigate to the new icon you want to use, choose it and click Open. That will now be the icon for that device. Even for removable flash drives/external drives. As long as you keep the icon in the same place (i just use my home folder).. It will always appear for that device when it's mounted.

Hope that helps.

1
  • Nope, doesn't help. See my comment on the question above. (Besides: henrique answered the same like you a week ago ;))
    – dAnjou
    Jun 15, 2011 at 11:11
0

I have used the "autorun.inf" route on my windows machines but for some reason it does not work with Ubuntu 14.10. Also, if you actually name the chosen icon "autorun.ico" it lets you readily identify that it is in use by autorun so you do not delete it. On superuser a similar question was answered with:

Another way to accomplish this is to use desktop.ini. (Actually, on USB drives, I use both autorun.inf and desktop.ini). This technique has the virtue that it also works for individual folders. Simply create your desktop.ini file with contents similar to:

[.ShellClassInfo]
InfoTip=Some descriptive text here
IconFile=.\icons\DriveUSB.ico
IconIndex=0

Where I have a folder called "icons" which contains an assortment of icon files. I can then customize this (and autorun.inf if needed) as the need arises to display an appropriate icon. Also, when you mouse over the folder icon, your descriptive text will be displayed.

You'll also want to set the "system" and "hidden" attributes on the file (desktop.ini) to make sure that Windows gives it the special treatment that it deserves. You can do this in the GUI or with the command:

attrib +s +h +r desktop.ini

For more information on desktop.ini, see this MSDN article.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .