Hermit Notebook

Add a Gnome desktop entry

Add a Gnome desktop entry

Reminder: you can left-scroll and right-scroll the long code blocks

Sometimes on Linux, a software you “install” is just an App Image (like the 18.12.1b version of the video editing software Kdenlive) or a bunch of files with an executable sh script (like the Python IDE pycharm).

Personally I prefer when I can find my app by searching for them in the Gnome’s search bar. I also appreciate when there is a nice and immediately recognizable icon for my application when I search for them on Gnome Desktop. Moreover, by using Gnome to launch them, you won’t need to open a terminal in order run your software.

Finding an app in Gnome Desktop

In order to add a desktop entry for Gnome, you can write a .desktop file in .local/share/applications (actually it could be placed anywhere) and make it executable.

If you use the examples above, adapt the path to your settings.

Here is an example of creating a desktop entry for Pycharm:

1
2
3
4
5
6
7
8
9
10
11
echo '#!/usr/bin/env xdg-open

[Desktop Entry]
Name=Pycharm
Type=Application
Terminal=false
Exec=/home/harry/Apps/pycharm/bin/pycharm.sh
Icon=/home/harry/Apps/pycharm/bin/pycharm.png
Comment=IDE for Python developpers
Categories=IDE;Programing;Python;
' > ~/.local/share/applications/pycharm.desktop

And this is the example for Kdenlive:

1
2
3
4
5
6
7
8
9
10
11
echo '#!/usr/bin/env xdg-open

[Desktop Entry]
Name=Kdenlive
Type=Application
Terminal=false
Exec=/home/harry/Apps/Kdenlive/kdenlive-18.12.1b-x86_64.appimage
Icon=/home/harry/Apps/icons/kdenlive-logo-hori.jpg
Comment=KDE Non-Linear Video Editor
Categories=Movie;Editing;
' > ~/.local/share/applications/kdenlive.desktop

Thanks for reading !
See you soon !
Keep learning !