X11: get list of all gnome-terminal windows on my display?
-
06-07-2019 - |
Question
I have two xterms and several gnome-terminal windows active on my X display.
However, xlsclients only shows one gnome-terminal client.
$ xlsclients
luban.local /usr/X11/bin/xterm
ohm gnome-terminal
luban.local xterm
How can I get a list of the gnome-terminal sessions attached to my display?
Solution
This option will run the new terminal window in its own process and as a distinct X client.
--disable-factory
These options
--instance=foo --class=bar
provide a convenient hook to distinguish between sessions:
$ xlsclients -l
...
Window 0x3000001:
Machine: ohm
Name: Terminal
Icon Name: foo
Command: foo
Instance/Class: foo/bar
OTHER TIPS
This is correct; gnome-terminal (like konsole) starts just a single process. If you ask for a second console, the process opens a new window but doesn't start another process just for that window (unlike xterm). This saves a lot of memory and resources.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow