# Connect to extra VNC consoles

**URL:** <https://forum.remote.it/t/connect-to-extra-vnc-consoles/441>\
**Category:** Applications\
**Created:** [September 30, 2021, 4:09pm UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441 "2021-09-30T16:09:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomD](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@TomD](https://forum.remote.it/u/TomD)\
**Post date:** [September 30, 2021, 4:09pm UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441/1 "2021-09-30T16:09:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [October 6, 2021, 9:44pm UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441/2 "2021-10-06T21:44:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TomD](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@TomD](https://forum.remote.it/u/TomD)\
**Post date:** [October 8, 2021, 1:57pm UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441/3 "2021-10-08T13:57:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [October 19, 2021, 8:47pm UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441/4 "2021-10-19T20:47:25Z")

</div>

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

```auto
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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![TomD](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@TomD](https://forum.remote.it/u/TomD)\
**Post date:** [October 20, 2021, 10:50am UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441/5 "2021-10-20T10:50:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [October 21, 2021, 1:58am UTC](https://forum.remote.it/t/connect-to-extra-vnc-consoles/441/6 "2021-10-21T01:58:07Z")

</div>

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