2

I have an odd (to me) problem with a menu item. When I click Programming, I see the launcher I want but it has the wrong path. That is what I need to correct. When I right click and select properties, I can see everything but cannot edit it. If I go to Preferences->Main Menu Editor and click on Programming, the item is not there (that is the odd part). How do I edit the path for an item? TIA.

8
  • Let me see what do I see in "Preferences > Main Menu Editor > Programming", I see the ticked and unticked items. I tried unticking some and found it works. I later ticked some others and also find it works. So my menu editor is working OK. I do remember twice I messed up the menu and could no longer get it work back again. I also read others reporting the same problem. My quick and dirty conclusion is that raspbian 10 buster desktop still has some teething problems. The easy get around is install a new SD card image! :)
    – tlfong01
    Commented Sep 11, 2019 at 1:52
  • One more thing. If you create a new panel, and later want to remove it, system will warn you panel CANNOT be recovered. So if you by mistake REMOVED MAIN MENU, you might be in big trouble, because without main menu, you cannot do anything afterwards, or onlt limited things. So if you made a mess, you might not recover, and need to start afresh a new SD image. I am not complaining anything, because the whole menu thing is already a big improvement, over terminal commands and raspi-config. I do think the menu program is very complicated and little bugs here and there are reasonable.
    – tlfong01
    Commented Sep 11, 2019 at 5:16
  • 1
    The main menu editor is working, it is just that the one application I need to fix is not there.
    – Wt Riker
    Commented Sep 11, 2019 at 13:03
  • 1
    @tlfong01 Removing the main menu can be easily undone by reinstalling the lxpanel package from the command line. Commented Sep 11, 2019 at 13:31
  • 1
    @Dmitry Grigoryev, Just now I tried to reinstall the lxpanel. I first remove lxpanel then install. However, install procedure got messed up with lirc daemon which I forgot to stop. Anyway, I think there are too many things or traps that a linux newbie like me would fall into. BTW, your comment "the format of .desktop files is pretty self-explanatory" makes me laugh (or in my native language, “bitterly laugh". I guess it might take me at least 30 minutes to google the weird .desktop parameters before I have confidence to modify anything. Anyway, might try later. Many thanks again.
    – tlfong01
    Commented Sep 12, 2019 at 14:04

1 Answer 1

2

Main menu is stored as a collection of .desktop files in /usr/share/applications. These files are not editable without root permissions. You can either edit those files with sudo, or create your own menu in ~/.local/share/applications.

There's one more place: /usr/local/share/applications, which is typically used for software you install without the help of the package manager, e.g. with sudo make install

The format of .desktop files is pretty self-explanatory:

[Desktop Entry]
Encoding=UTF-8
Exec=warsow
Icon=/home/USER/my/icons/wsw-icon_80x80.png
Type=Application
Terminal=false
Name=Warsow
GenericName=warsow
StartupNotify=false
Categories=Game

After a modification, you may need to remove cached items from ~/.cache/menus or run lxpanelctl restart for your changes to take effect.

5
  • 1
    Thanks. I tried that too but like the main menu editor, that application's .desktop file is not there. This is the dilemma, I don't know where/how that item is hidden to edit it or delete it. I can create a new one that is correct but not get rid of the bad one.
    – Wt Riker
    Commented Sep 11, 2019 at 13:07
  • I think I figured it out. There are apparently 2 places where the desktop looks for items. One is where I was expect it to be (/usr/share/applications) which is all users, the other is for just the current user (.local/share/applications). My problem now it to figure out how to set that up for all users. Just adding it to /usr/share does not do it.
    – Wt Riker
    Commented Sep 11, 2019 at 13:47
  • “Main menu is stored as a collection of .desktop files in /usr/share/applications.” Now I am using a backup working copy of SD card, with a good main menu etc. I am checking out the "/usr/share/applications" using Desktop File Manager. I found things there a bit complicated, and for sure not for faint of heart linux newbies like me. So I am not going to dive deeper, ... :(
    – tlfong01
    Commented Sep 13, 2019 at 5:26
  • @WtRiker See if my edit helps. Commented Sep 13, 2019 at 6:39
  • Thanks again. I have the .desktop file in /usr/share/applications and it looks correct. However, it does not show up in the menu so there must be some other hook somewhere that is missing. I have been a Linux admin for a long time but this is my first venture with Raspbarian.
    – Wt Riker
    Commented Sep 13, 2019 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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