7

I would like to learn how to determine the name of the .png file used on a desktop launcher. By opening the properties box of a launcher, it is possible to get a lot of info and to change the .png file. I would like to learn how to determine the file name of the .png file used for a launcher, but have been unable to find a way to do it.

Thanks- tom

2 Answers 2

9

Hit super and start typing main menu until it shows up. Click it and you will see your menu. I will take deluge as an example. This is the icon it shows in the launcher:

im5

One way of finding it is:

im1

Choose properties and you will see:

im2

Click the icon and it will show the directory of the icon at the top:

im6

So it is in /usr/share/icons/Faenza-dark/apps/48. In there are several directories with sizes and in there are the icons for said size. Your should be able to find the exact name of any icon in the menu.

The launcher for deluge sits in /usr/share/applications/ and is called deluge.desktop. When I open it with gedit (gedit /usr/share/applications/deluge.desktop) you will see 1 of the lines stating what the name of the icon is: Icon=deluge. I assume all of these icons are png(?)

So now we know the name but not the location on the disc but we can use locate on command line for that. This is a list of all deluge.png files on my system (basically all the themes and all the sizes):

im7

If you want to find all icons in any of the launchers you can do that command line too:

cd /usr/share/applications
grep -R Icon= *desktop | more

and you will get this:

im9

Pages and pages of icon names!

1
  • 3
    If locate doesn't work run sudo updatedb May 25, 2011 at 19:53
0

The best way is going to /usr/share/applications on Nautilus (or your favourite file browser). Then open gedit as root.

Select any .desktop file and drag it to gedit (obviously you can open it in several different ways, but I this is specially quick for me). You will see the .desktop file content, the interesting thing it that:

Icon=someapp

If the icon name is only «someapp» and it doesn't specify any special location, it will use your selected icon theme; this is great, because it will use all sizes.

You can type add an extension format so that it will only use this format, but in all sizes.

If you specify the path, it will only use that specific icon and only its size, e.g, Icon=/home/user/niceicons/cuteicon.png: if the icon is 16x16 px, it will be aweful when showing it in the Unity panel, for instance, which doesn't happen when you use a .svg (Scalable Vectorial Grpahic, wich addapts to any kind of size).

I prefer this way instead of the GUI way, because it's clearer what are you putting on the .desktop file.

Hope it helps you ;)

2
  • why do you need to do any of this as root. You should be able to browse to this folder as any user. Obviously doing anything as root is risky and should be avoided if at all possible.
    – fossfreedom
    May 25, 2011 at 19:51
  • Oh, yes, you only have to open gedit as root. May 26, 2011 at 18:18

You must log in to answer this question.

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