Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
163
rated 0 times [  163] [ 0]  / answers: 1 / hits: 56643  / 2 Years ago, wed, august 17, 2022, 10:16:56

I am working on this pre-existent .desktop file and I have a doubt:



The file content is:



[Desktop Entry]
#Icon=connect-data-space
Icon=XCloud
Categories=Utility;
Type=Application
#Exec=/usr/share/ConnectDataSpace/appl/launcher.sh
Exec=/usr/share/XCloud/appl/launcher.sh
Name[en_US]=Connect Data Space
#Name=Connect Data Space
Name=XCloud
Comment[en_US]=
Comment=
StartupNotify=true
Terminal=false
OnlyShowIn=GNOME;Unity;
StartupWMClass=ConnectDataSpace
Actions=CheckUpgrade

[Desktop Action CheckUpgrade]
Name=Verifica Aggiornamenti
#Exec=java -jar /usr/share/ConnectDataSpace/appl/lib/shellExtBridge.jar -checkupgrade
Exec=java -jar /usr/share/XCloud/appl/lib/shellExtBridge.jar -checkupgrade
OnlyShowIn=GNOME;Unity;


What exactly does the StartupWMClass field of this file represent?


More From » .desktop

 Answers
5

Modern Linux desktop environments (Gnome 3, Ubuntu Unity, Docky) use the WMClass property to associate windows with the owning application. Many Java-based applications have the problem where the windows created by the application are not associated with the shortcut used to start the application (so the dock contains multiple copies of the same icon).



So the field called StartupWMClass is a string that defines in which class the application is grouped in the Unity Launcher at startup.



You can find out which WM_CLASS your window has got when you type in a terminal:



xprop WM_CLASS


and then click at the window. In case of the gnome terminal the output is as follows:



WM_CLASS(STRING) = "gnome-terminal", "Gnome-terminal"


So all windows with WM_CLASS "gnome-terminal" and "Gnome-terminal" are grouped together.


[#28684] Friday, August 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tigehanc

Total Points: 162
Total Questions: 113
Total Answers: 122

Location: Zambia
Member since Sat, Oct 31, 2020
4 Years ago
;