Page 1 of 1

Impossible to connect via VNC headless

Posted: Tue Apr 14, 2020 10:46 pm
by Crussader87
Hello, first of all I’m new here so please redirect this topic if necessary.

I’ve got a Raspberry Pi 4 (4GB) with Ubuntu sever 19.10 and Lubuntu desktop installed. I did a headless setup as I dont have screen, keyboard or mouse to work with so I did everything via SSH but I want to access via VNC to have the desktop environment.

I followed every tutorial online but I couldn’t get it working. I did manage with Raspbian so I don’t really know what else to try, I’m very new to this.
I’ve tried with x11vnc, tiger vnc and tighvnc.

The closest I got was with this tutorial: https://www.tecmint.com/install-and-...ver-on-ubuntu/
But when I reached the part where I have to create an SSH tunnel to VNC server I got the error:

Warning: Identity file /home/ubuntu/.ssh/ubuntu19.04 not accessible: No such file or directory.
ubuntu@192.168.1.127's password:
bind [127.0.0.1]:5901: Address already in use
channel_setup_fwd_listener_tcpip: cannot listen to port: 5901
Could not request local forwarding.


I don’t really know what else to do, if any has a link to a tutorial that is working for you please let me know.

Thanks

Re: Impossible to connect via VNC headless

Posted: Thu Apr 16, 2020 2:37 pm
by DougieLawson
Crussader87 wrote:
Tue Apr 14, 2020 10:46 pm
I followed every tutorial online but I couldn’t get it working. I did manage with Raspbian so I don’t really know what else to try, I’m very new to this.
I’ve tried with x11vnc, tiger vnc and tighvnc.
if you're new to the game why not use Raspbian rather than Ubuntu as it's easier to learn how to use that and you'll get better support from here.

Re: Impossible to connect via VNC headless

Posted: Thu Apr 16, 2020 9:17 pm
by waveform80
Can't say I know anything about TightVNC (or VNC generally beyond playing with RealVNC on raspbian, which is a pretty slick piece of kit). However, setting up xrdp is relatively simple and provides a similar remote desktop experience (barring the fancy bits RealVNC does like camera previews - I don't think anything else can do that yet as nothing else uses dispmanx for display capture):
  • Install your favoured desktop package (in your case you've gone with lubuntu-desktop - a good choice for the pi)
  • Install xrdp: sudo apt install xrdp
  • Add the xrdp user to the ssl-cert group (so it can access the default snakeoil certificate): sudo adduser xrdp ssl-cert
  • Restart the service (so the group change takes effect): sudo systemctl restart xrdp
  • Connect to your Pi with some RDP client like remmina
In the RDP client you'll need to specify the hostname (which hopefully you can figure out with whatever your local network provides), your login username (presumably ubuntu) and password (also ubuntu by default but you must have changed this before connecting with RDP, so SSH to your Pi first to do this).