I followed all the steps in this answer: https://askubuntu.com/a/975230/719469
However when I run xprop WM_CLASS
in Terminal and click on my application's window, it gives me: WM_CLASS: not found.
What should I do to get a single icon of the app on the Ubuntu Dock?
The application I am talking about is Recoll, installed using apt-get install recoll
. I am using Ubuntu 18.04 (Xorg).
The contents of .desktop
file in /usr/share/applications
:
[Desktop Entry]
Categories=Utility;Filesystem;Database;
Comment=Find documents by specifying search terms
Exec=recoll
GenericName=Local Text Search
Icon=recoll
Name=Recoll
Terminal=false
Type=Application
Keywords=Search;Full Text;
Edit:
I tried changing the .desktop
file lines by making these changes
Exec=recoll --class CustomClassName
and then adding the line
StartupWMClass=CustomClassName
After doing this, the app fails to launch from its icon and I still get WM_CLASS: not found.
in the terminal
For a similar situation I have to do the following:
Determine the class as in the new answer in related question
Briefly:
lg
Enter, go toWindows
menu (up-right).wmclass
Add class to
.desktop
fileNormally in:
/usr/share/applications
or.local/share/applications
keep icon in favorites (add to menu)
open app, right button in icon, 'Add to favorites'. If this fails, check that in .desktop
Terminal=false
or: open
dconf-editor
, searchfavorite-apps
, add.desktop
file to listor: Paste this to create a script for that purpose