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.
1 Answer
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.
-
1Thanks. 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 RikerCommented 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 RikerCommented 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, ... :(– tlfong01Commented Sep 13, 2019 at 5:26
-
-
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 RikerCommented Sep 13, 2019 at 15:14
lxpanel
package from the command line.