Modify

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#18013 closed defect (fixed)

Define StartUpWMClass in Linux desktop file

Reported by: Josef.Latt@… Owned by: Don-vip
Priority: normal Milestone: 19.08
Component: Core Version:
Keywords: linux regression Cc: naoliv

Description

Bitte die StartupWMClass in der Desktop-DAteio wie folgt ändern:

StartupWMClass=org-openstreetmap-josm-gui-MainApplication

Attachments (0)

Change History (6)

comment:1 by Don-vip, 5 years ago

Cc: naoliv added
Keywords: linux added
Summary: StartUpWMClassDefine StartUpWMClass in Linux desktop file
Type: defectenhancement

Documentation:

https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html

If specified, it is known that the application will map at least one window with the given string as its WM class or WM name hint (see the Startup Notification Protocol Specification for more details).

https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt

a string to match against the "resource name" or "resource class" hints. If this key is present, the launchee will most likely not send a "remove" message on its own. If the desktop environment detects a toplevel window mapped with this name or class, it should send a "remove" message for the startup sequence. Note that the class hint is in Latin-1, so the value of this key must be converted to Latin-1 before strcmp'ing it with the window class/name. (Though in all known cases only ASCII is involved so it doesn't matter.)

https://askubuntu.com/questions/367396/what-does-the-startupwmclass-field-of-a-desktop-file-represent

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.

@naoliv do you confirm that with Gnome 3 the xprop command gives the result suggested in this ticket?

comment:2 by naoliv, 5 years ago

Both on awesome and Gnome 3 I can see this:

$ xprop WM_CLASS
WM_CLASS(STRING) = "org-openstreetmap-josm-gui-MainApplication", "org-openstreetmap-josm-gui-MainApplication"

comment:3 by Don-vip, 5 years ago

Milestone: 19.08
Owner: changed from team to Don-vip
Status: newassigned

comment:4 by Don-vip, 5 years ago

Keywords: regression added
Type: enhancementdefect

In fact regression of r14253 when I killed Main.

comment:5 by Don-vip, 5 years ago

Resolution: fixed
Status: assignedclosed

In 15283/josm:

fix #18013 - fix StartupWMClass parameter in Linux desktop files

comment:6 by taylor.smock, 3 years ago

In 18402/josm:

fix #21957, see #18013: Fix StartupWMClass for linux (patch by CjMalone)

StartupWMClass was missing the -gui part of the package for MainApplication.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.