views:

917

answers:

2

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?

A: 

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.

Aaron Digulla
A: 

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
Mark Harrison