GNOME Bugzilla – Bug 775383
--name and --class don't work
Last modified: 2017-02-27 14:58:02 UTC
Found at https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1645874 The --name and --class cmdline parameters (which are documented and shown by --help-all) don't work. The g-t command doesn't pass them to g-t-s. If I manually pass these arguments to g-t-s then they work. (Note: in xprop's output, the --name appears as the first entry of WM_CLASS, and --class appears as the second entry of this. WM_NAME is something different (the actual title). Not sure if it's a bug and --name should appear at WM_NAME, or just me not understanding x props :))
They appear in --help-all output because they come from the gtk option group and we have no control over that. I don't think that means we must support them; actually I don't think we should support them.
I don't care about these either, but if's as simple as passing these arguments unchanged to g-t-s then why not :)
There is actually a very legitimate use case for this : allow full integration of console application with gnome-shell. For example, I have created a .desktop file to start weechat, an IRC client that I use with its ncurses interface. Here is the .desktop file I use: #!/usr/bin/env xdg-open [Desktop Entry] Terminal=false Name=weechat Exec=gnome-terminal --hide-menubar --class weechat --name weechat -e weechat Categories=Network Keywords=weechat,irc StartupWMClass=weechat Type=Application Icon=weechat Version=1.0 If it worked, I would have the weechat icon on my dock. Because it doesn't work, it is bundled with the many gnome-terminal windows I have opened and I can never just Alt-Tab to focus on my IRC client easily. A solution would be to use another terminal emulator that supports setting WM_CLASS, but I quite like all the features of gnome-terminal, do I don't want to change... Apparently, someone using ubuntu came with a patch, it might not even be that hard to support this.
These cmdline options are gone from gtk4 already, so I don't think we'll introduce support for them just to remove it again when porting to gtk4. Note that we also have --role which you can use to distinguish the windows (e.g. with devilspie).
Window name is not enough. GNOME Shell only differenciate with the WM class. Epiphany does something similar to create web application. Terminal could gain a similar feature. See bug #779315