Score:0

Using different dock entries for different applications launched with the same binary on Ubuntu 22.04

cn flag
Tgr

The Gnome desktop dock (and other similar applications) use the window's WM_CLASS property to group windows, so different windows with the same class will be grouped together under the same dock icon. Sometimes this is unwanted; most commonly, when gnome-terminal is used to launch various terminal-based applications. E.g. I have a dock icon to open IRC; I want the newly created window to be grouped under that icon, not the terminal icon.

Traditionally, the solution was to use either the --class command line parameter that many different frameworks provide, or some hack (like this one) to change the window class. But 1) with the deprecation of set_wmclass() those --class parameters are increasingly removed or broken (e.g. gnome-terminal has such a parameter but it doesn't seem to do anything); 2) with Ubuntu 22.04 LTS switching from X11 to Wayland as default in most cases, none of the previous hacks to change WM_CLASS work. The Wayland equivalent to the window class seems to be the app ID, but AIUI the functionality to change it is not exposed outside the application the way it is in X11.

Is there a better way to set the window class, or to influence dock grouping in some other way?

Tgr avatar
cn flag
Tgr
https://askubuntu.com/questions/1411410/different-icons-in-dock-for-the-same-application-gnome-terminal is a similar question, but the solution described there doesn't work at all. I can verify with e.g. the looking glass tool that `--class` doesn't actually set the `gnome-terminal` window's class.
Tgr avatar
cn flag
Tgr
Related bug reports: [gnome-terminal](https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7734), [terminator](https://bugs.launchpad.net/terminator/+bug/1695793)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.