1

Consider the following setup: My laptop is normally located at my desk connected to power, external keyboard and mouse and an external monitor. Since the laptop's screen is pretty small and my monitor is pretty big, I work with the laptop screen turned off using only the external monitor. Recently I wanted to take the laptop to another place to continue working there, hence I disconnected all the externals and took the device now running on battery with me.

Before doing so, I had made a break and during that break the desktop had locked itself and switched off the monitors. Therefore I did not remember that I had to change the display settings to use the internal screen as I removed the external monitor and when I ended up at my new location, I was looking into a black screen and I could not change the screen settings using the laptop's quick access keys since the desktop was locked. However, I had still access to the tty's using the CTRL+ALT+F keys and I was wondering if there was some way to access and change the respective settings from a command line without rebooting the computer, restarting the display manager or any other action that forcefully terminates the user's current session.

Of course, I could just have gone back to my desk, connect the external monitor, change the settings and disconnect again. Or I could have unlocked my desktop by entering my password blindly and then use the screen setting hotkeys, but these options might not be available in some cases.

1

xrandr should be what you are looking for.

Also, you may need to review the instructions Multihead instructions.

I have had good luck with xrandr on gnome 3 but it should work fine with KDE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.