1

I tried to stop X so I could install graphics drivers. First I tried with killall -9 X but X server just restarted. Then I tried init 3 but that didn't closed X. How do I close it?

6 Answers 6

6

Just stop (as root) the process that respawns the X server:

# /etc/init.d/xdm stop

(yes, this is xdm even though you might be using something totally different)

2
  • @quack rollback since this is always xdm in gentoo. gdm and kdm are started by the xdm init script depending on the site configuration. Mar 24, 2010 at 3:22
  • sorry about introducing the mistake. i think i went in to fix the code block formatting and got distracted. Mar 24, 2010 at 3:28
2

Press Ctrl+Alt+F1 to get to the tty where the X server is running from and then Ctrl+C to kill the server.

Alternately, if X started an xterm for you, run top and find the PID of the process named "X". Then press k, enter the PID, press enter, press 2 and then enter at the "Kill with signal" prompt, and there you go. This will also work if your keyboard drivers are not set up correctly and therefore no input is accepted, you just have to use ssh to login over then network.

Alternately, press Ctrl+Alt+Backspace (this will only work with some configurations).

3
  • I used killall on X processes and then X just restarted, won't kill do the same?
    – Joe
    Dec 19, 2009 at 1:10
  • It may, and if it does, you can go to another tty (for examply tty2 with Ctrl+Alt+F2) and install the drivers from there, and then restart X using killall.
    – marcusw
    Dec 19, 2009 at 2:40
  • was stuck on the log in screen and couldnt figure out how to get out. Ctrl+Alt+F1 did the trick Jan 3, 2016 at 2:49
1

If you're booting with Grub, you can reboot & enter just the number 3 as a boot option, and it should boot into init level 3. I'm sure you can do this with the other boot loaders, but I haven't used anything but Grub in a while.

0

If X starts automatically during boot, and you can't get X to stop, you can:

  1. Reboot and when it is booting, press i to enter interactive boot mode.
  2. Tell it to start services until you get to the one that starts X (usually either local or the name of the display manager you are using, finding this out may take some trial and error), and then press 2 to skip the service.
  3. When you make it to the login prompt, login as root and install your drivers.
  4. Reboot or just run "/etc/init.d/{service_skipped} start" and that should start your login manager or X.
0

If you don't can stop x. Then you could change driver name "vesa" or "nv" for "master of linux". This will crash you xorg.conf. Now, reboot your pc.

Login and install with sudo sh Nvidia-Linux-x86-195.30-pkg1.run

And automatically configure your new xorg.conf.

Reboot again, and problem resoult.

Im sorry my English. I don's speak very well. Im spanish from Buenos Aires, Argentina.

I have same problem and resolv to this way.

0

Just to update this: apparently the /etc/init.d/xdm script has been deprecated; the command is now:

# /etc/init.d/display-manager stop

You must log in to answer this question.