I have used the answers given here How to create a desktop shortcut in Unity? to set a custom application shortcut for spacemacs. While the shortcut works for launching the application, on running, the Emacs icon pops up and is used for selecting the program etc. This is unlike ordinary applications such as Evince where the running icon and launch icon are the same.
Is it possible to get the custom icon to behave in an identical manner as Evince and other ordinary program icons? I am using Ubuntu 15.10.
Contents of spacemacs.desktop
file:
[Desktop Entry]
Name=Spacemacs
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/xc++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascaltext/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacs %F
Icon=/home/varunubuntu/.emacs.d/core/banners/img/spacemacs.png
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
EDIT: For clarifying after a few comments: the ideal behaviour for me would be that the Emacs icon should not pop up and the Spacemacs icon (put in by hand) should behave identically as the Evince icon.
.desktop
file to your question. – Byte Commander Jan 27 '16 at 17:29StartupWMClass=Emacs
. Remove it and try starting Spacemacs again. Maybe you need to log out and back in for the changes to take effect, but usually not. It should not run as Emacs in the launcher then any more, does it? – Byte Commander Jan 27 '16 at 17:34Alt-Tab
still shows the Emacs icon as earlier. – typesanitizer Jan 27 '16 at 17:37xprop WM_CLASS
in a terminal and click the Spacemacs window and post the terminal output line? – Byte Commander Jan 27 '16 at 17:38WM_CLASS(STRING) = "emacs", "Emacs24"
with bothStartupWMClass=Emacs
andStartupWMClass=emacs24
(as given in one of the answers below). – typesanitizer Jan 27 '16 at 17:40StartupWMClass=
to one of those two values, probablyStartupWMClass=Emacs24
is the best way, as @JacobVlijm already wrote. – Byte Commander Jan 27 '16 at 17:42