How to use xrandr when ssh login

Hi NV,
we want to use xrandr when login ssh,
1.sudo su
2.export DISPLAY=:0
but it doesn’t work, and show follow message,

No protocol specified
Can’t open display :0

any suggestion?

Do you have physical monitor connected on your jetson?

Hi Wayne,
yes, we have physical monitor connect to jetson with HDMI,
but we still need to use xrandr on login ssh,
in case if hit display issue make no display on monitor,

please try with DISPLAY=:1. Sometimes the :0 is occupied by other process.

Hi Wayne,
got fail result as follow message,

root@tegra-ubuntu:/home/asus# export DISPLAY=:1
root@tegra-ubuntu:/home/asus# xrandr
Can’t open display :1

Please do not run as root and it will work.

Hi Wayne,
got the same result,

asus@tegra-ubuntu:~$ export DISPLAY=:1
asus@tegra-ubuntu:~$ xrandr
Can’t open display :1

Use :0

Hi Wayne,
it’s work,

Incidentally, the original error was probably that you used sudo. The DISPLAY must be accessed by the same user to which the DISPLAY is running. My guess is that your X was running under a name other than root.

Hi linuxdev,
got it,
thanks for your information

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.