How to kill and to start the X server?
In 12.04 How do you kill the X server from the command line and from the GUI interface and how do you start it from the virtual terminal?
If you just want to kill the X server, you can enable the Ctrl+Alt+Backspace key combinations on “Options” of keyboard layout settings.
One way to restart an instance of the X server is to run (from the commandline)
sudo service lightdm restart
For Ubuntu 15.04 and later:
sudo systemctl restart lightdm.service
and for Kubuntu 15.04 and later:
sudo systemctl stop sddm.service
lightdm? I thought gdm was for GNOME, kdm for KDE, xdm for XFCE and lightdm for LXDE! and to stp it from the gUI?
lightdm is the default for 12.04, I'm not sure when it was made the default perhaps in 11.10?
On 12.04, you can restart the server with the shortcut keys: Right Alt + Print Screen + K.
What a strange combination!. Print??. It has no logic; and what would "(Right alt) + (Print Screen) + K" be in an Apple keyboard? I have right command and no print
http://en.wikipedia.org/wiki/Magic_SysRq_key has more info on it if you want to understand the logic behind it. printscreen is the same key as sysrq(System Request).
@semi: "printscreen is the same key as sysrq" - not on my keyboard. `sysreq` is the same key as `delete`.
What happens if you hit right alt + sysrq + k on your key layout? Does it still work? I just know internally they always call it the magic sysrq key, so it seems odd that it would become the magic printscreen key just because of another layout being used.
In order for this to work you need to run this command once: `sudo echo kernel.sysrq=1 > /etc/sysctl.d/10-magic-sysrq.conf`
-ameans it will kill all display instances. For more information run
startxbut this command is to start an instance and not the server itself. For more information run
I don't believe it's possible to kill Xserver from GUI, and even if it were, it would not be the right way to do it.
Wouldn't that kill all individual windows, which is not what the user wants? For example I don't want to kill all my firefox windows, I want to restart the visualisation.