linuxmint / cinnamon-menus

The cinnamon-menu library
GNU General Public License v2.0
25 stars 20 forks source link

I broke my system by mistake with bad usage of menu@cinnamon #43

Open class101 opened 3 years ago

class101 commented 3 years ago

Hello,

Yesterday I broke cinnamon and nemo I believe by deleting wrong menu entries.

Steps to reproduce :

  1. Right click the menu icon > Configure...
  2. Switch to the menu tab
  3. Click "Open the menu editor"
  4. Select the category "Other"

From here I thought first the names in italic font were safe to delete since when I select one, the Delete button is enabled as shown in the picture below.

This was a disastrous idea I think because after doing so and after a system restart, cinnamon and nemo-desktop failed to start at all, no more panels, no more desktop icons, I needed to start manually cinnamon --replace and nemo-desktop to partially recover.

And to fully recover the automatic boot, I have deleted all the files in /home/arno/.local/share/applications

To note that the button of menu@cinnamon "Restore System Configuration" did not help for recovering this case, since this was my settings overriding the default system settings.

Steps to fix :

I suggest that, when a user selects a system entry in italic font, the Delete button should be disabled for preventing any wrong usage as I have done, because this was not very easy to fix all this by myself, I was close to reinstall everything haha.

Hope you understand :)

Screenshot from 2020-12-23 14-17-17

collinss commented 3 years ago

Italics just means it's not shown in the menu, but the desktop file still gets read when the menu gets populated, because that's how the spec works. Likewise, when you 'delete' an entry, it doesn't really delete the desktop file (because that desktop file is typically in a folder owned by root, and we really don't want it deleting if for all users). Instead, it creates a copy of the desktop file with a flag added to indicate that it shouldn't be shown in the menu editor.

My guess is that your issue stems from that desktop file being corrupted somehow. If you could run cinnamon-menu-editor from a command line, and try to reproduce the issue again, then check the terminal output for errors or warnings, that would go a long way toward tracking down the issue and fixing it (assuming there are actually errors in the terminal). Also, if you have an offending desktop file to share, that would also help provide additional clues.

Oh, and if you could provide your cinnamon version, that would also help.

class101 commented 3 years ago

Sorry for the late reply, I just realized I missed your reply from 15 days ago, probably the notification went into the spam. Yeah I have also noted when fixing that the issue was probably something in my user home conflicting with something in the system since deleting the changes in here was sufficient enough to fix the problem. But indeed I do edit desktop files manually sometimes it is very possible I made a mistake in one of them.

Firstly I think I will try to reproduce to be closer to the root cause of the issue, yet I just linked this to the menu editor because this was the last thing I changed before the restarts failed but it is very possible the issue remains somewhere else.