I’m trying to set up desktop shortcuts for some applications i’m using on a daily basis, however i can’t make sense of how it is actually working.
Because i want to be able to add, remove and modify shortcut easily i rather have those file in a .desktop directory that i’m keeping in my user directory (home/baptiste). To my understanding it should work just fine.
I’m using Debian 12 with Gnome 43.9 and editing the .desktop file with a text editor.
One of the shortcut is working exactly as expected it’s a Windows .exe running through wine, the .desktop file is located in my target directory at home/baptiste/.desktop
Exec=wine /home/baptiste/.wine/drive_c/Program Files\ \(x86\)/Linkuit\ Studio/Linkuit\ Studio.exe
I’ve check and it appears that this guy is only located here (no copy in /usr/share/applications nor home/baptiste/.local/share/applications).
However i have two other .desktop that are not working at all as they do not appears in the app menu.
The first one links to a shell script (bash) located in another directory (home/baptiste/src/RANDOM/), the script activate a python venv and execute a python App.
here is the .desktop file :
and the .sh script which doesn’t seems to be the issue as when invoked with
bash home/baptiste/src/RANDOM/Random.sh it launches the app (no matter where i’m located) :
This one drives me crazy as previously the .desktop file was located in the ~/src/RANDOM/ directory. The shortcut was appearing in my App menu (without the icon, but who cares) and worked just fine.
The last one needs to launch an AppImage also located in my home/baptiste/src/ directory :
I’ve made some experiments with the .desktop entries like commenting/uncommenting the Icon entry (doesn’t matter), checking if the command line in the Exec entry launch the app (it does), trying with Terminal = true to see if i would have an error (no error)…
Therefore i have several questions :
- How and why the first one is working perfectly and not the other ? Am I missing something very obvious ?
- What are the requirements for a desktop entry to be added to the App Menu in Gnome ? Does the shortcut need to link to a valid command line or is it only checked when clicked (this one is more personal curiosity).
- While experimenting with .desktop files, how to refresh the App Menu without logging out or rebooting ?
- What’s the “101 - How to .desktop file” procedure ? Is there any program out there to create .desktop file through GUI or CLI ?
On other topic i’m fairly new to GNU/Linux and Computer Sciences in general, i’ll be very open to best practices/suggestions.
Relevant documentation i’ve found :
The problem is not permission related as
ls -l yields:
-rwxr-xr-x 1 baptiste baptiste 220 28 déc. 17:14 'Linkuit Studio.desktop'
-rwxr-xr-x 1 baptiste baptiste 156 28 déc. 17:09 Nextcloud.desktop
-rwxr-xr-x 1 baptiste baptiste 145 28 déc. 17:07 Random.desktop