I know this sounds ridiculous at first glance, but I started X session from root with

# X :1 vt08 &

So I guess sudo stop lightdm would be overkill. How can I stop that instance of X server without stopping main X session?

1 Answer 1


You should be able to find the PID of the running X instances and kill the one you don't want. For example:

$ pgrep -a X
3885 /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm3/auth-for-Debian-gdm-M5IpFT/database -nolisten tcp vt7
$ kill 3885

Your output will have more than one PID since you are running multiple instances, so make sure you pick the right one.

  • Actually, I found the correct PID in initial output (i.e. when you start something, it prints PID like [nnnn]). But when it's lost, your solution is awesome!
    – Danatela
    Apr 15, 2015 at 10:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .