Saturday, April 27, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 18086  / 2 Years ago, mon, april 4, 2022, 1:54:51

I set the display settings of my laptop so that when an external screen is plugged in, only the external screen is used. However, when I plug it in after being logged into Ubuntu, it stays as if no screen was plugged in.
That is not a big problem since the display settings refresh after I go into "System Settings" > "Displays".



That is kind of unhandy, so I would like to use the terminal to refresh the display settings. I guess it has something to do with an xrandr command. I tried xrandr --dryrun, this works but outputs a lot of stuff. It doesn't seem to be the right command.



What is the correct command?


More From » command-line

 Answers
7

For some reason the first answer did not work for me, but it brought me to to this command, which seems to do what I want:



xrandr --auto && xrandr --output LVDS --off


I will create an alias in the .bashrc.


[#29080] Tuesday, April 5, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rstride

Total Points: 305
Total Questions: 112
Total Answers: 118

Location: Mali
Member since Sat, Dec 26, 2020
3 Years ago
;