Connect to extra VNC consoles

Hi

I am fairly new to this, I have a Pi with a screen that I don’t have showing the Gui, so I have a cron job to run at start up to start a new virtual VNC desktop. if I use VNC to connect to it locally I use ip:1 how would I connect to this using Remote.it? i feel i am missing a trick to get it working.

cheers

Tom

Hi Tom,

#1 I’ve configured VNC on a Pi to run (using raspi-config) and don’t have to use cron to start it up. I’m not sure what you mean about “a screen that I don’t have” other than you are not using a screen, it’s just accessible online. It’s possible that you don’t need to run a cron job and then our standard setup should work without having to add :1 anywhere.

#2 If for some reason you don’t think that will work, please send me the line in your crontab which starts VNC and I’ll try it here.

Thanks,

Gary

Hi

so the setup I have is the primary screen doesn’t go into the gui it just stays at the shell, so this means if I try to VNC to the device with no settings then I just get a message that says it cannot currently show the desktop (because there is no desktop). I would like to keep the primary screen like this.

so to be able to VNC to the device and get a UI i run this command in Crontab @reboot vncserver -randr=1920x1080 this creates a Virtual desktop Gui, to VNC to it I use this in the server address in VNC 192.168.100.108:1 and it connects me to the virtual desktop which can not be seen on the primary screen.

if I run vncserver -randr=1920x1080 again I get a second virtual desktop and I would use the server address192.168.100.108:2 to connect to it.

I would love to be able to connect to the Virtual desktops Remote.it

does this help explain?

Tom

Hi Tom,

Sorry for the delay in getting back to you. Here’s what I’ve discovered, using a Raspberry Pi.

Setting up VNC using raspi-config, I wind up with a TCP listener on port 5900.

e.g.

sudo netstat -lpn | grep tcp

shows

pi@raspberrypi:~ $ sudo netstat -lpn | grep tcp
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      499/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      339/cupsd
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      457/vncserver-x11-c
tcp6       0      0 :::22                   :::*                    LISTEN      499/sshd
tcp6       0      0 ::1:631                 :::*                    LISTEN      339/cupsd
tcp6       0      0 :::5900                 :::*                    LISTEN      457/vncserver-x11-c
pi@raspberrypi:~ $

Now, I run:

vncserver -randr=1920x1080

netstat now shows something listening on ports 5901 and 6001.

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      499/sshd
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      339/cupsd
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      457/vncserver-x11-c
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      1001/Xvnc-core
tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN      1001/Xvnc-core
tcp6       0      0 :::22                   :::*                    LISTEN      499/sshd
tcp6       0      0 ::1:631                 :::*                    LISTEN      339/cupsd
tcp6       0      0 :::5900                 :::*                    LISTEN      457/vncserver-x11-c
tcp6       0      0 :::5901                 :::*                    LISTEN      1001/Xvnc-core
tcp6       0      0 :::6001                 :::*                    LISTEN      1001/Xvnc-core
pi@raspberrypi:~ $

I can connect over the LAN to both of these.

192.168.1.225 gives the same result as 192.168.1.225:0
192.168.1.225:5901 gives the same result as 192.168.1.225:1

5900 is the default (small screen) and 5901 is the larger screen.

I configured a remoteit VNC service on port 5900. This connection works properly in VNC Viewer.

I configured another remoteit VNC service on port 5901. This connection also works.

Please check the port which is active using the netstat command, then configure the remoteit VNC service to use this port. You don’t have to add anything extra to the connection string. Let me know if this works OK for you.

Hi

thats got it, I don’t know why I didn’t think to check the listening ports. the only other thing I had to do was change the authentication to VNCpassword rather than Unix as there is an incompatibility with RealVNC when connecting. more than happy to live with that.

thanks very much

Tom

Great, glad it works. Weird about the authentication. I’ll double check that here.