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?
4 Answers
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). Commented Sep 16, 2016 at 17:19
-
I was guessing from the level of detail of the question that Mr. Wolf knows his way around the terminal. :) Commented Sep 16, 2016 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). Commented Sep 17, 2016 at 22:30
-
Oh, I see. And what would the advantage be in this case? How would that work? Curious myself now. :) Commented Sep 18, 2016 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.