2

I am running with vanilla-gnome-desktop, using GNOME Classic on Ubuntu 18.04.

When pressing Super and entering KeePass plus Enter, the ~/Desktop/KeePass.desktop file is opened in an editor (gedit in my case). Curiously when - after enabling showing of the desktop symbols (gsettings set org.gnome.desktop.background show-desktop-icons true) - I double click the very same item on the desktop, the application opens as expected. While showing up in the launcher, the .desktop file is shown with the proper app icon (just like on the desktop itself) and it shows up with the path to ~/Desktop (expanded, though).

What gives? And how do I get the launcher to invoke the program described by the .desktop file?


Possibly relevant information:

$ cat ~/Desktop/KeePass.desktop |sed 's|'$(whoami)'|username|g'
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/home/username/bin/KeePass/KeePass_icon.png
Exec=mono /home/username/bin/KeePass/KeePass.exe
Name[en_US]=KeePass
Name=KeePass
Icon=/home/username/bin/KeePass/KeePass_icon.png
X-Desktop-File-Install-Version=0.23

... and:

$ ls -l bin/KeePass/KeePass.exe Desktop/KeePass.desktop |sed 's|'$(whoami)'|username|g'
-rwxr-xr-x 1 username username 3315280 2019-09-22 21:27 bin/KeePass/KeePass.exe
-rwxr-xr-x 1 username username     302 2019-09-22 21:27 Desktop/KeePass.desktop

Furthermore desktop-file-validate Desktop/KeePass.desktop comes back empty with 0 exit code. As far as I recall I used desktop-file-edit to initially create said .desktop file, but I had added mono to the Exec line so as to not confuse the system, because I am also using Wine and Crossover for certain applications.

0

1 Answer 1

4

Your .desktop file likely appears as a found file in Gnome shell overview, and thus is handled accordingly.

Make sure your .desktop file resides in ~/.local/share/applications. Only then will it be picked up correctly as an application. You can leave the copy on the desktop if you appreciate being able to launch it directly from the desktop, or remove it there and pin it to the Dash (right-click in the overview to do that) if you want to follow the workflow that the Gnome developers have in mind.

1
  • That worked. Sorry for the delayed response. Moving it to ~/.local/share/applications was the missing piece of the puzzle. I also noticed that there CrossOver Office had already placed .desktop files for programs. Nov 3, 2019 at 16:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .