Sometimes we need to make some changes in Ubuntu that require restarting the X Server.
One way to restart the X server is running the following command in the shell:
sudo /etc/init.d/gdm restart
Another way to do that is configuring a shortcut Ctrl+Alt+Backspace that is disabled by default in Ubuntu.
In the terminal, type:
setxkbmap -option terminate:ctrl_alt_bksp
Now, to test that, hold Ctrl+Alt+Backspace to restart the X Server. However, to keep this functionality working for each Ubuntu startup, open the terminal and type:
It will be opened a window like this one:
Click on add button and another window like this one will be opened:
Fill up for each field.
Command: setxkbmap -option terminate:ctrl_alt_bksp
Comment: Restart the X Server
Click on add button and after on close button. That’s it, all the time you start the Ubuntu and hold those keys, the X Server will be restarted.
See you next time.