I have a computer with a broken screen, I try to connect to this computer via VNC. The good thing is that I can access this computer via SSH.
The bad thing is I can't open the display from the SSH connection, it seems like.

➜  ~ who
vdegenne pts/0        2020-12-29 15:41 (
vdegenne :0           2020-12-29 15:33 (:0)
➜  ~ x0vncserver -display 0 -SecurityTypes=None
x0vncserver: unable to open display "0"
➜  ~ echo $DISPLAY

As you can see I am connected with the same user "vdegenne" one from the SSH session, one from the original connection (even though my laptop screen is broken I know what to type to log into my i3 session).

Is there a way to tell SSH which display to use during the session so I can (at least) start the VNC service?


  • Try with -display :0 (note the colon). – Eduardo Trápani Dec 29 '20 at 15:39

Your Answer

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

Browse other questions tagged or ask your own question.