Changing An Application Icon In Main Menu

27 replies [Last post]
davidpgil
Offline
Joined: 08/26/2015

Hello All! I'm using Gnome with Trisquel and I would like to add an application link to my main menu software listing. I know how to add a software to the list and link it, but how to I add my own custom icon graphic to it? Which format does it accept? I tried a PMNG image at 48x48 and it doesn't seem to work. Any help with this?

I prefer a gui-based solution over command-line, but I am open :)

Many thanks!

- David

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

You can convert the image to PNG. Using GIMP's export for instance (in the "File" menu). Well, that is assuming GIMP can load a PMNG image (a format I have never heard of).

MeNoMore
Offline
Joined: 10/05/2015

Think it was suppose to be PNG. D:

davidpgil
Offline
Joined: 08/26/2015

I meant PNG. Typo :)

mYself
Offline
Joined: 01/18/2012

PNG is the preferred format, however, several others such as BMP, GIF, ICO, SVG, XPM are also accepted. Application icons showed in Main Menu are of 24x24 pixels, so you'll have to make sure that the icon will be "readable" at this size.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

The preferred format actually is SVG. Because it is vectorial, icons look perfect even if huge on a high-definition screen.

mYself
Offline
Joined: 01/18/2012

Vector based formats are the preferred choice when designing and optimizing an icon (set) for a specific target dimension (e.g. 24x24 pixels), but in the latter case, the display quality will regardless stay the same. However, you're right about preferring SVG(Z) since this would involve an unnecessary extra step (exporting to PNG), and also it's better to distribute in a modifiable source format. I simply have bad experience using vector editing programs (like Inkscape), and since most icon themes usually comes in PNG (except the "scalable" ones), I think raster images are better/easier to work with. That's, however, until I learn how to properly use them.

onpon4
Offline
Joined: 05/30/2012

You would probably appreciate vector-based icons more if you used GNOME Shell. Some of the icons in Trisquel 6 were ugly as hell, because they were I think 32x32 raster images and GNOME Shell displays icons at a larger size. I actually switched to the stock GNOME theme (Adwaita) because of this when I was using Trisquel 6.

mYself
Offline
Joined: 01/18/2012

This isn't about that I don't like vector graphics formats (I prefer SVG whenever I can!), it's just that working with them (in Inkscape) is impossibly hard, and totally user-unfriendly (far worse than using GIMP). That, and because I usually use raster images as source when creating or editing icons (usually but rarely) for games are the main reasons why I choose PNG over SVG.

quantumgravity
Offline
Joined: 04/22/2013

”Vector based formats are the preferred choice when designing and optimizing an icon (set) for a specific target dimension (e.g. 24x24 pixels)"

The advantage of vector based formats is that their quality remains regardless of their size.
I cannot understand why they should be the preferred choice when disigning an icon for a specific target dimension.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

I do not understand why one would design an icon for a specific target dimension! The icons on the desktop can be resized. They depend on the theme (what about low-vision handicaps?), on the size of the panel (if on the panel), etc.

But, sure, if for some reason the icon has to be displayed in a 24 pixel squared area (what means tiny on a high-resolution screen), then SVG has no advantage over a 24x24 raster image.

mYself
Offline
Joined: 01/18/2012

Optimizations are mostly needed for very small icons when there's only a limited amount of pixels to use, however, more details can be added at larger sizes (up to 512x512 pixels). Vector icons are NOT the type of one-size-fits-all. They look good within a range of sizes they were designed for. Desktop icons fit into the general/mid-range so they're not really affected by this.

Here's a real-life example of an icon optimized for different sizes (icon comes from trisquel-icon-theme):

And this is a visual representation of what I mean:

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

Thank you for the illustrated explanations. :-)

davidpgil
Offline
Joined: 08/26/2015

I definitely agree SVG would be better in general.

Calinou
Offline
Joined: 03/08/2014

Some screens are high-DPI, thus the icon might show up at 32×32, 48×48, 64×64 or even 96×96, but still take the same screen real estate.

mYself
Offline
Joined: 01/18/2012

Nope, unless you manually increase the scaling factor. However, this feature will be very likely available in future releases of Trisquel as different desktop environments are making progress on this.

lembas
Offline
Joined: 05/13/2010

> The advantage of vector based formats is that their quality remains regardless of their size.

Except for very small sizes. Then genuine handmade pixel art wins. :)

mYself
Offline
Joined: 01/18/2012

> The advantage of vector based formats is that their quality remains regardless of their size.

This is not completely true. Overly detailed images will likely going to look blurry at small scales, while less detailed images are simply going to look bad at bigger sizes.

> I cannot understand why they should be the preferred choice when disigning an icon for a specific target dimension.

I'm sorry but I forgot to add a comma before "and". I meant "designing" and "optimizing" separately, not together.

davidpgil
Offline
Joined: 08/26/2015

I actually tired loading a PNG image and it wasn't viewable at 48x48. I guess I'll try 24x24 to see if it works.

mYself
Offline
Joined: 01/18/2012

Also, the GUI based solution for adding an existing icon to your launcher is by using the Main Menu tool (alacarte). You can access it by right-clicking on the Trisquel icon (Applications), or through System Settings. Then follow:

select your launcher → Properties → click on the icon

I don't use nor recommend this path though (it's better to edit the launcher manually).

elayer12
Offline
Joined: 10/29/2015

Hi mYself,

what is the configuration-file of the launcher?

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

Your home-made launchers are in ~/.local/share/applications. The system ones are in /usr/share/applications/.

onpon4
Offline
Joined: 05/30/2012

It's a bit more complicated than that. There are XML files or something like that indicating where in the menu each launcher belongs; without this, a launcher just gets put in the "Other" menu. I don't know where this stuff is, though.

mYself
Offline
Joined: 01/18/2012

I don't understand your question. What do you mean by "what is the configuration-file of the launcher?"

elayer12
Offline
Joined: 10/29/2015

it was maybe a stupid question. I am new to Trisquel and i don't know how the Taskbar is configured. I thought there is maybe somewhere a configuration file or directory, where things can be customized via terminal.

onpon4
Offline
Joined: 05/30/2012

I don't think there are commands for changing the panel. I guess you could manually edit config files, but the easiest way to change the panel is with the mouse. Right-click on the applicable item and a menu opens up. Hold Alt while you're right-clicking on something and an alternative menu allowing you to move or remove the item from the panel. Right-click on an empty space on the panel and you can configure the panels themselves (size, number of panels, orientation of panels, look of panels).

mYself
Offline
Joined: 01/18/2012

+1

@elayer12: Also, taskbar is called GNOME Panel in Trisquel.

davidpgil
Offline
Joined: 08/26/2015

Guys, I made a 24x24 SVG file and loaded it into the place in the attached screenshot for the program "Ardour". It still doesn't appear.

Screenshot from 2015-11-01 07:41:16.png