After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775383 - --name and --class don't work
--name and --class don't work
Status: RESOLVED WONTFIX
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal minor
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-30 09:17 UTC by Egmont Koblinger
Modified: 2017-02-27 14:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2016-11-30 09:17:18 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 :))
Comment 1 Christian Persch′ 2016-11-30 09:56:58 UTC
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.
Comment 2 Egmont Koblinger 2016-11-30 12:31:32 UTC
I don't care about these either, but if's as simple as passing these arguments unchanged to g-t-s then why not :)
Comment 3 Mildred 2017-01-06 16:50:49 UTC
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.
Comment 4 Christian Persch 2017-01-30 15:59:55 UTC
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).
Comment 5 Mildred 2017-02-27 14:58:02 UTC
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