GNOME 3 desktop entry duplicate

Was trying to get simple desktop entry to work without creating duplicated after app run.

That's for st3 under GNOME3 (Fedora 19), and .desktop file looks like this:

[Desktop Entry]
Version=3.047
Type=Application
Name=Sublime Text 3
Icon=path-to-logo.png
Exec="path-to-exec" %f
Comment=some comment
Categories=Editor;Text;
Terminal=false
StartupWMClass=Sublime_text

Thought that "StartupWMClass" key will do the job of grouping windows in a dock, but it does not. Looks like I've missed something.

I got wmclass with xprop WMCLASS:

[[email protected] ~]$ xprop WM_CLASS
WM_CLASS(STRING) = "sublime_text", "Sublime_text"

Example:

Desktop entry is at the top (ye, another logo file), but app is not get grouped in it and is shown separately. Any way to fix it?

Thanx for help!

UPDATE: I've changed .desktop entry to:

[Desktop Entry]
Type=Application
Terminal=false
Name=Sublime Text 3
StartupNotify=true
GenericName=Text Editor
Comment=Edit text files
Exec="/usr/local/bin/sublime_text_3/sublime_text" %U
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;x-directory/normal;inode/directory;
Categories=GNOME;GTK;Utility;TextEditor;Application;Development;
Icon=/usr/local/bin/sublime_text_3/st3_custom_logo.png
Name[en_US]=Sublime Text 3

(found on the st forum)

Everything is fine now. Don't understand how it works though, thought that WMClass is how windows are grouped.

2
2022-07-25 20:40:53
Source Share
Answers: 0