Ubuntu – How find out what is autostarting the terminal

autostartterminatorxfcexubuntu

I have Xubuntu 16.04 with XFCE window manager.

Every time when I start my computer, the terminal of Terminator is also autostarting.

When I look into "Session and Startup", , I found nothing which relates to Terminator. And "Automatically save session on logout" is also unchecked.

In the Terminator settings, there is no autostart option available.

In the following folders:

~/.config/autostart
/etc/xdg/autostart

There are no contents related to Terminator, so it's scratching my mind where Terminator autostartup come from.

When I change the name Terminator as following

sudo mv /usr/bin/terminator /usr/bin/terminator.backup(

and rebooting, Terminator is indeed not starting. Looking into my logs on /var/log, grepping for anything that would relate to Terminator, I found nothing.

Any suggestion to find out which process is responsible for the autostarting Terminator?

Best Answer

pstree is the best way I can think of.

First you need to find the PID of your terminator session you want to trace. I use gnome-terminal so I would use:

$ ps aux | grep gnome-terminal
rick     10321  0.0  0.0  14524  1088 pts/18   S+   20:49   0:00 grep --color=auto gnome-terminal
rick     12871  0.0  0.4 538372 37968 ?        Sl   Jun10   0:31 /usr/lib/gnome-terminal/gnome-terminal-server

The first PID is the ps aux command itself so ignore that. You will have two other PIDs, one for the ghost and one for the ghost-hunter session. Use this to display the pstree for both PIDs:

$ pstree -sapl 12871
systemd,1 splash fastboot kaslr
  └─lightdm,1050
      └─lightdm,1597 --session-child 12 19
          └─upstart,1891 --user
              └─gnome-terminal-,12871
                  ├─bash,12879
                  ├─bash,15278
                  │   └─pstree,21311 -sapl 12871
                  ├─{dconf worker},12873
                  ├─{gdbus},12875
                  └─{gmain},12874

The pstree will trace back all parent processes to your terminator sessions based on PID (Process Identification).