Duplicated "Internet" menu entry. Is Chrome the root cause?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
DaveJones
Level 2
Level 2
Posts: 57
Joined: Tue Sep 20, 2016 7:37 pm

Duplicated "Internet" menu entry. Is Chrome the root cause?

Post by DaveJones »

Hi all,

After updating Chrome recently, I noticed that I have two Internet menu categories:

Image

One category contains only Chrome and the second one contains all other entries (Firefox etc)... and it also contains Chrome!

I've opened the Menu Editor from System Settings and the two entries are identical: same title, same description. And if I uncheck one of the entries, the other entry unchecks itself too. They seem to be identical and linked yet for some reason Cinnamon shows two entries.

I run latest Linux Mint 19 (fully up to date) and themes do not change this behavior (tried several themes including default one).

Anyone have some ideas? Thanks in advance!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: Duplicated "Internet" menu entry. Is Chrome the root cause?

Post by gm10 »

I'd have to load up a Cinnamon VM to see how they set up the menu but either way, what happens is that your menu has a number of pre-defined categories. Every graphical application that you install provides a .desktop file which contains a Categories= entry. It will get shown in every matching category in your menu.

That fact that it made a new category pop up just means that it is the first application you installed that supported it. However, it's still a category that your menu had pre-defined, otherwise it would not show. So what you do is you right-click your menu button, select preferences or configure or whatever Cinnamon calls it, find the menu editor button on the screen that pops up, and then in the menu editor you just remove that second Internet category.

Alternatively you could edit Chrome's .desktop file (in /usr/share/applications/) but then you just risk the next browser you install causing the same problem.
DaveJones
Level 2
Level 2
Posts: 57
Joined: Tue Sep 20, 2016 7:37 pm

Re: Duplicated "Internet" menu entry. Is Chrome the root cause?

Post by DaveJones »

Thanks for a reply gm10!
I have not tried using the "Delete" button on the second Internet menu entry because I'm afraid that I'd lose the original menu entry. The reason why I think this might happen is because if I uncheck one, the other one gets unchecked too. See this gif:

https://i.imgur.com/5ufezJ3.gifv

Edit: just as I suspected. If I hit the Delete button on Chrome on the second entry, it removes Chrome from the original entry as well.

In /usr/share/applications I checked whether Chrome desktop file has something inside of it that makes it want to create another category but it seems to be almost the same as Chromium. About the only suspect entry is "StartupWMClass" lines.

Code: Select all

$ diff google-chrome.desktop chromium.desktop
3c3
< Name=Google Chrome
---
> Name=Chromium
108,109c108
< StartupWMClass=Google-chrome
< Exec=/usr/bin/google-chrome-stable %U
---
> Exec=/usr/bin/chromium %U
112c111
< Icon=google-chrome
---
> Icon=chromium
170,171c169
< StartupWMClass=Google-chrome
< Exec=/usr/bin/google-chrome-stable
---
> Exec=/usr/bin/chromium
223,224c221
< StartupWMClass=Google-chrome
< Exec=/usr/bin/google-chrome-stable --incognito
---
> Exec=/usr/bin/chromium --incognito
 
I've also found: ~/.local/share/applications/google-chrome.desktop and I've removed it and restarted Cinnamon but the second Internet entry was still there.

I'm still not sure what would make Chrome make another category.... hmm.

My temporary fix is to uncheck the Chrome entry. This hides the second Internet category:

Image

But this doesn't remove the underlying cause...
gm10

Re: Duplicated "Internet" menu entry. Is Chrome the root cause?

Post by gm10 »

Ok, I loaded up Cinnamon in a VM, seems you cannot directly remove categories in their menu editor, but there is a button called "Restore System Configuration" at the bottom and if you do that, then any non-default categories should get removed.

As to why you got the problem in the first place, do you possibly have several desktop environments installed at the same time? Because stuff like this is what can happen if you do.
Locked

Return to “Cinnamon”