
I would like to control display configuration of my Ubuntu20.04 through SSH. Windows machine issues the command via SSH, Ubuntu will execute it. It worked with Ubuntu 18.04, but it doesn't after I upgraded it to 20.04.
What I did with 18.04 was like this.
ssh <user>@<Ubuntu IP> bash -c 'export DISPLAY=:1; xrandr --auto && xrandr --output HDMI-0 --off'
But it doesn't work with 20.04, I get "Can't open display" error. Tried DISPLAY=:0 but it didn't help. Can anybody help?
Regards,
2 Answers
xrandr -display :0.0 work well in uart cmd line
You can use -display :0.0
option for controling display configuration through SSH.
e.g. set brightness via SSH :
xrandr -display :0.0 --output HDMI-0 --brightness 0.2
ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobmtvYmuFdX%2BOnJinrF2kvaa6jJ2grKiclsZuw8itn2awopa7pb6MsJ%2Bepl2eerPBzWagrWWfq7KzedKsn2agkaW9prrIp55mp55iwqPBza2sa2hdZQ%3D%3D