Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way to shut down the xserver on linux without root access? I tried ctrl-alt-f1. It seems there is still xserver running. Thank you.

share|improve this question

migrated from stackoverflow.com Jun 26 '11 at 22:01

This question came from our site for professional and enthusiast programmers.

1  
Try Ctrl+Alt+Backspace. –  Greg Hewgill Jun 26 '11 at 21:58
    
.. and hope that it doesn't restart :) –  yi_H Jun 26 '11 at 21:59

2 Answers 2

Ctrl-Alt-Backspace

will usually kill the X-server.

Be aware that many linux distributions will automatically relaunch X.

share|improve this answer

The X server will still run when you switch virtual consoles. You can even run multiple X servers, each on a different virtual console.

If you want it gone, you have two options:

  • kill the magic xinit process
  • kill the X server

If you kill the last process started out of ~/.xinitrc or the last process started via the display manager (xdm, gdm, kdm, lxdm, etc.), this will typically also ask the other processes to close, semi-gracefully, and might save some additional state.

If you kill the X server directly, all those clients will drastically lose their connection to the X server, and might not handle it well. But it can be an excellent tool to recover a broken or wedged X, and it is sure easier to type killall X rather than trying to figure out which process is the magic xinit process.

You can kill the X server from another virtual console or from ssh or telnet, or any other mechanism that will let you run a command killall X or send the X server process a signal.

share|improve this answer
    
Of course, that requires superuser privileges, so your answer to the question asked has to be "No.". (-: –  JdeBP Jun 27 '11 at 9:39
    
@JdeBP, for the last two paragraphs, yes; but killing the magic xinit/display manager process will also kill the running X. Whether or not it restarts X is a site configuration question. :) –  sarnold Jun 27 '11 at 22:06
    
It's also part of what an answer must address. Notice that the questioner didn't ask how to kill X, but how to shut down X. –  JdeBP Jun 28 '11 at 9:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.