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.
2 Answers
Ctrl-Alt-Backspace
will usually kill the X-server.
Be aware that many linux distributions will automatically relaunch X.
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.
-
Of course, that requires superuser privileges, so your answer to the question asked has to be "No.". (-:– JdeBPJun 27, 2011 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. :)– sarnoldJun 27, 2011 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.– JdeBPJun 28, 2011 at 9:13