Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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:

[me@pc ~]$ xprop WM_CLASS
WM_CLASS(STRING) = "sublime_text", "Sublime_text"

Example:

enter image description here

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.

share|improve this question
    
So, I'm guessing the addition of the MimeType resolved the issue on your system with the "Sublime" text editor? Do you follow the same procedure for other applications on your system with same issues? I noticed the "WMClass" entry is missing altogether. This freedesktop classification stuff is confusing as hell! :( –  ILMostro_7 Jun 5 at 7:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.