Forum › Forums › New users › New Users and General Questions › How to update applications menu
- This topic has 4 replies, 4 voices, and was last updated Apr 6-2:09 pm by marcelocripe.
-
AuthorPosts
-
April 5, 2023 at 9:34 pm #104159Member
hughtmccullough
I recently installed the Thonny Python IDE on my antix computer using the bash script they provide at https://github.com/thonny/thonny/releases/tag/v4.0.2. The installation went well and downloaded and installed Thonny in my ~/apps/thonny/bin directory. Thonny runs if I double-click on it from that directory or if I place the path to it in a terminal.
The problem is that I can’t get Thonny to appear in my applications menu. There is a .desktop file in ~/.local/share/applications/ as follows:
“[Desktop Entry]
Type=Application
Name=Thonny
GenericName=Python IDE
Exec=/home/…/apps/thonny/bin/thonny %F
Comment=Python IDE for beginners
Icon=/home/…/apps/thonny/lib/python3.10/site-packages/thonny/res/thonny.png
StartupWMClass=Thonny
Terminal=false
Categories=Development;IDE;GTK;
Keywords=programming;education;
MimeType=text/x-python;
Actions=Edit;[Desktop Action Edit]
Exec=/home/…/apps/thonny/bin/thonny %F
Name=Edit with Thonny”I tried using Refresh Menu and when that didn’t work I tried rebooting. I also tried copying the .desktop file to /usr/share/applications/. (Right clicking on the .desktop file and selecting execute does start Thonny fine). I also tried adding lines like the following that sometimes help:
NoDisplay=False
StartupNotify=falseWhatever I do there is no entry in the applications menu. Am I missing something? How do I get thonny to appear, preferable under the Programming heading?
NoDisplay=False
StartupNotify=falseApril 5, 2023 at 10:01 pm #104163Forum Admin
Dave
::Likely you would need to disable the apt automatic menu update by removing the symlink in the appropriate window manger config directory. (~/.icewm or ~/.fluxbox or ~/.jwm) Then update the menu with the “refresh menu” button in the menu or running “desktop-menu –write-out”. Future menu updates (example: after an apt upgrade) will need to happen by pressing the update menu button and would not be automatic.
This is because we do not want to automatically alter the users home directory from a system perspective without the user’s knowledge. The idea behind this is to prevent overwriting a user’s custom configuration or otherwise corrupting the user’s account / data. Files in ~/.local/*-*.desktop are user specific files that the system “cannot” see nor is it added to the standard system menus in /usr/share/desktop-menu/ where every user would see it. (As the standard user menu-applications files are symlinks to those system files).
You could copy them to /usr/share/applications/ if you are ok with every user seeing it (though I do not think other users could use it due to standard home permissions), as you have. However to update the menus you would need to run “sudo desktop-menu –write-out”. (or “/usr/local/lib/desktop-menu/desktop-menu-apt-update force” for all window managers like is done when running apt)
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
April 6, 2023 at 5:58 am #104179MemberXunzi_23
::Have you tried to set the item to show in the controll center menu maintenance tool.
Sometimes items set themselves to do not show, in cases like that refreshing menu will change nothing.
In very stubborn cases you can use the control center tool to create a personal menu entry.Very useful at times.
April 6, 2023 at 10:37 am #104190Memberhughtmccullough
::Dave, Thanks. I get the gist of what you are saying in your first two paragraphs but I’m not totally sure what to do about it or, at least, what the longer term implications would be. So, I did what you said in your third paragraph. “sudo desktop-menu –write-out” didn’t work but “/usr/local/lib/desktop-menu/desktop-menu-apt-update force” did work.
Xunzi_23, Thanks. That was helpful. Thonny actually comes up as “shown” in the applications list but the option of using the personal menu is a quick and easy fix that would have been a close second-best if I hadn’t been able to solve the problem with Dave’s suggestions.
April 6, 2023 at 2:09 pm #104202Member
marcelocripe
::Hello hughtmccullough, try the command:
sudo desktop-menu --write-out-globalIf it doesn’t work, remove the “StartupWMClass=Thonny” entry, save the “.desktop” file and apply the command again (whenever you make any changes to a “.desktop” file, the above command must be applied in Terminal). If the program is still not displayed in the menu, remove the “MimeType=text/x-python;” entry, save the “.desktop” file and apply the command again. Some entries in the “.desktop” files are dedicated to desktop environments and these entries are not needed for a window manager (IceWm, Fluxbox or JWM).
marcelocripe
(Original text in Brazilian Portuguese language)– – – – –
Olá hughtmccullough, tente o comando:
sudo desktop-menu --write-out-globalSe não funcionar, remova a entrada “StartupWMClass=Thonny”, salve o arquivo “.desktop” e aplique o comando novamente (sempre que você fizer qualquer alteração em um arquivo “.desktop”, o comando acima deverá ser aplicado no Terminal). Se mesmo assim o programa não for exibido no menu, remova a entrada “MimeType=text/x-python;”, salve o arquivo “.desktop” e aplique o comando novamente. Algumas entradas dos arquivos “.desktop” são dedicadas para os ambientes de trabalho e estas entradas não são necessárias para um gerenciador de janelas (IceWm, Fluxbox ou JWM).
marcelocripe
(Texto original em idioma Português do Brasil)- This reply was modified 1 month ago by caprea. Reason: changed code block
-
AuthorPosts
- You must be logged in to reply to this topic.