X11: get list of all gnome-terminal windows on my display?

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?

Answers

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
Posted on by Mark Harrison

Relevant tags