Whenever I create a new terminal its PPID is set to the one as
gnome-terminal-server even when it's created using
3340 22404 22404 22404 ? -1 Ssl 1000 1:16 \_ /usr/lib/gnome-terminal/gnome-terminal-server 22404 23096 23096 23096 pts/1 23096 Ss+ 1000 0:00 \_ bash 22404 23563 23563 23563 pts/0 23613 Ss 1000 0:00 \_ bash 23563 23613 23613 23563 pts/0 23613 R+ 1000 0:00 \_ ps jfax
I was particularly interested in how it acquires new
pty before realizing the PPID issue (named
pts/1 here) so I did
strace -ff gnome-terminal and it shows two
exec, one for
gnome-terminal an another for
gnome-terminal.real and none of the PIDs is that of our newly created terminal.
I'm assuming it sends some message to terminal server over a unix socket or something but I can't quite find it and I can't strace the
gnome-terminal-server either, even with
Operation not permitted.
If I grep
socket I can find some
unix sockets indeed but I can't find any useful clue connecting it to
Anyone knows the steps of spawning a new terminal and how it acquires new
ptys, or alternatively how I can investigate this socket or ...?