If you know your account password, this is going to be (thankfully) easy to fix.
- Press the Ctrl+Alt+F1 keys on your keyboard all at the same time. You will be transported to a TTY (or a giant terminal without any fancy graphics).
- Log in to your user account. Note that you must know your username and password.
Delete the monitor config file:
rm ~/.config/monitors.xml
Log out of the tty with the logout
or exit
command, and press Ctrl+Alt+F7 to get back to the GUI.
- Log in as normal, and enjoy having your screen back.
The monitors.xml
file contains practically all information about your own monitor configuration. Unfortunately, this gets annoying. And, as this file is owned by your user, you must either be your user or root.
If for some reason you can't reach the TTY, you'll need to reboot into recovery mode. Follow the instructions in that post until you see root@something:~#
. Then, run this command:
rm /home/<your_username>/.config/monitors.xml
Then, reboot your system using the reboot
command.
sudo
andsu
? http://askubuntu.com/questions/747343/how-is-the-guest-account-prevented-from-using-su-and-sudo – muru Mar 30 '17 at 06:54setgid: Operation not permitted
– Shairyar Baig Mar 30 '17 at 06:57su
. I've updated my answer. – Kaz Wolfe Mar 30 '17 at 06:59