Custom icon for menu category (Cinnamon)

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Post Reply
Harkon
Level 1
Level 1
Posts: 2
Joined: Sat Feb 14, 2015 4:11 pm

Custom icon for menu category (Cinnamon)

Post by Harkon »

I've tried to research this and I cannot seem to find a good answer for it.

I want to add a new category to the Cinnamon menu. I can do so and add
program items under it, but I cannot add a custom icon to the new category.
I tried using a .PNG file, which seems to work fine for the program
(application) items, but it will not work for the category. The icon
doesn't show up at all. I tried saving the .PNG as a .SVG using InkScape
but that didn't work any better. If I leave the icon file in my home folder
it doesn't even leave a space for the icon. If I create a symlink to the
file in /usr/share/icons/MintX/96/ then I get a space for the icon, but it
is empty. If I try to use the SVG file it won't sick, IOW, when I go back
the icon is empty. If I use the .PGN file, it shows up fine in the editor,
but not in the menu. If I use any other icon in the directory it shows up
fine, I just can't seem to figure out how to get it to use my icon. I even
went so far as to use a functional existing .SVG file and make some simple
modifications. Seems something doesn't like InkScape saved SVG files.

The research I've done on this shows that others have experienced this, but
there doesn't seem to be a fix for it, or at least if there is, no one
seems to be telling.

User avatar
roblm
Level 12
Level 12
Posts: 4403
Joined: Sun Feb 24, 2013 2:41 pm

Re: Custom icon for menu category (Cinnamon)

Post by roblm »

To use a custom made icon for a new or existing menu category, it must be added to two locations. With root authority, copy it first to
/usr/share/icons/Mint-X/categories/48. Or to folder /96. Then add it to /home/your-user-name/.icons. If the .icons folder does not exist, then create it. Then open the Menu Editor, right click on the new category, select Properties, and select the icon you just added in /usr/share/icons/Mint-X/categories/48. If the icon does not appear in the Menu, then restart Cinnamon or Log out and back in.

This information comes from my post in this topic: viewtopic.php?f=228&t=129524

EDITED:
I have added updated info for Cinnamon 18.3 to my last post in this topic. Users with Mint 17.x or 18.x installed should use this updated guide: viewtopic.php?f=208&t=124153
Last edited by roblm on Fri May 04, 2018 9:48 am, edited 3 times in total.

Harkon
Level 1
Level 1
Posts: 2
Joined: Sat Feb 14, 2015 4:11 pm

Re: Custom icon for menu category (Cinnamon)

Post by Harkon »

Thanks roblm, that works. These are the sorts of things that, unless you know why this is required and why it's done this way, it just seems silly. Thank you for your help, I really appreciate it.

Wave
Level 1
Level 1
Posts: 3
Joined: Tue Feb 07, 2017 2:06 am

Re: Custom icon for menu category (Cinnamon)

Post by Wave »

By putting my new category icon in the same directory as another icon from another existing category, and giving it root ownership seems to work for me.

(Other answer wouldn't work: I am using Debian/Cinnamon and don't have a Mint-X directory. Also it seemed a little strange to have to put the icon in two different places.)

In my case I put my icon in

Code: Select all

/usr/share/icons/Adwaita/256x256/categories
(* Not sure what Adwaita but think it is or comes from some sort of a theme.)

Notes: Both 64x64 and 256x256 pixel sized icons seem to work fine. Also at first my icon didn't have a transparent layer for the background and it worked, but a bit ugly w/ white background. Made it transparent with gimp, and it looks better.

CCC999
Level 1
Level 1
Posts: 3
Joined: Sun Oct 08, 2017 1:58 pm

Re: Custom icon for menu category (Cinnamon)

Post by CCC999 »

The icon folders may have some issues with linked icons. I was trying to use a '/usr/share/icons/Mint-Y/apps/256' icon and it kept disappearing. Did a hard copy to a user folder (you may need to make the folder '/usr/share/icons/user'), and used that copy with success.
Seems to be another spot to work on....

a.bowers
Level 2
Level 2
Posts: 54
Joined: Mon Nov 24, 2014 3:50 pm

Re: Custom icon for menu category (Cinnamon)

Post by a.bowers »

Harkon wrote:
Tue Nov 22, 2016 10:56 am
Thanks roblm, that works. These are the sorts of things that, unless you know why this is required and why it's done this way, it just seems silly. Thank you for your help, I really appreciate it.
Why IS it done this way?

User avatar
roblm
Level 12
Level 12
Posts: 4403
Joined: Sun Feb 24, 2013 2:41 pm

Re: Custom icon for menu category (Cinnamon)

Post by roblm »

a.bowers wrote:
Thu Apr 26, 2018 4:35 am
Harkon wrote:
Tue Nov 22, 2016 10:56 am
Thanks roblm, that works. These are the sorts of things that, unless you know why this is required and why it's done this way, it just seems silly. Thank you for your help, I really appreciate it.
Why IS it done this way?
If you read my updated info for Mint 18.3 Cinnamon menu editing, then that info has changed. The custom icon only has to be added to the .icons folder. Then open the Menu Editor and select the icon from that location. However, the custom icon usually won’t be visible when the menu is opened. You will need to go to /home/your-user-name/.local/share/desktop-directories and open the configuration file that represents the category whose icon was changed. The name of the icon will be listed in the Icon= line. Usually the full path to the icon's location will be listed, such as Icon=/home/your-user-name/.icons/new-icon-name.png. However, the developers have designed this situation so that the icon will only be visible when only the icon name is listed, such as Icon=new-icon-name, NOT the full path to the icon’s location. So this line will need to be changed manually. The icon name's extension may be left on or off.

Previous instructions were to also add the icon to the /usr/share/icons/Mint-X/categories/48 folder (or other numbered folder). Then open the Menu Editor and select the icon's location from that location. This method usually also worked because when the icon is selected from this location in the Menu Editor, then the Icon= line is configured correctly.

To add to this confusion, for Mint 18.3 Xfce, the same situation applies. However, the icon name’s extension must be left OFF.
For Mint 18.3 MATE, the Icon= line does not have to be changed.

You will have to ask the developers why Cinnamon and Xfce require some editing but MATE does not.

Post Reply

Return to “Cinnamon”