How can I restart my GUI (X window server) from command line without rebooting the system? Which process(es) do I need to kill and do they automatically restart?
All you need to do is restart LightDM as root, like so:
sudo restart lightdm
-
1You should probably mention that you should do this from a TTY (virtual terminal). – RolandiXor Sep 16 '16 at 17:19
-
I was guessing from the level of detail of the question that Mr. Wolf knows his way around the terminal. :) – Fred Rocha Sep 16 '16 at 18:15
-
1I wasn't just referring to the "terminal", but oh well. (I said virtual for a reason. I mean the thing you get when you press ctrl+alt+f-key-of-your-choice). – RolandiXor Sep 17 '16 at 22:30
-
Oh, I see. And what would the advantage be in this case? How would that work? Curious myself now. :) – Fred Rocha Sep 18 '16 at 12:35
The worst is that noone mentioned that you must use alt+ctrl+F1 to F6 to switch to terminal. Login there as standard user. Restart x with sudo command and then press alt+ctrl+F7 to go back to GUI.
cd /etc/init.d sudo ./lightdm restart
-
Please add more information to your answer. For example, you can add steps like "open a terminal" and you can format the code with
code
– Maccer♦ Apr 11 at 9:14