Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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!

share|improve this answer
3  
If locate doesn't work run sudo updatedb –  Marco Ceppi May 25 '11 at 19:53

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 ;)

share|improve this answer
    
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 '11 at 19:51
    
Oh, yes, you only have to open gedit as root. –  Alfredo Hernández May 26 '11 at 18:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.