I exactly followed these instructions on the official RPi site to install TightVNC on my Pi (model 2). The Pi has a static IP address and I can ping it and SSH in (obviously), so I know it's working.

When I try to connect using the Windows TightVNC client, however, I get a message that the server actively refused the connection. I'm using 192.168.x.x:0 to connect, but I also tried 192.168.x.x:5900 as recommended elsewhere, neither worked. What do I need to do to get TightVNC to properly work?

ps aux | grep vnc returns the following:

root      1888  0.0  0.0   1768   376 ?        S    11:26   0:00 /bin/sh /etc/init.d/vncboot start
root      1899  0.0  0.3   4756  3752 ?        S    11:26   0:00 /usr/bin/perl /usr/bin/vncserver :0 -geometry 1920x1080 -depth 32 -pixelformat rgb565
root      2055  0.0  0.0   1692   272 ?        S    11:26   0:00 vncpasswd /root/.vnc/passwd

netstat -l returns this:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:ssh                   *:*                     LISTEN
udp        0      0        *:*
udp        0      0 localhost:ntp           *:*
udp        0      0 *:ntp                   *:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     4914     /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     4887     /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     4913     @/tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     6965     /tmp/.pcmanfm-socket--0-pi
unix  2      [ ACC ]     STREAM     LISTENING     4972     /tmp/ssh-yoCLTWKx0wUO/agent.2194
unix  2      [ ACC ]     STREAM     LISTENING     8238     /tmp/.menu-cached-:1-steven
unix  2      [ ACC ]     SEQPACKET  LISTENING     419      /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     5730     @/tmp/dbus-GF4T9MxwNb
unix  2      [ ACC ]     STREAM     LISTENING     5779     /tmp/.menu-cached-:0-pi

4 Answers 4


I know this was asked a long time ago, but I found an solution to this problem.

If you start it using display :1 (or something more than 0), you have to enter the IP like this: 192.168.x.x:590<displayNumber> (like this

I hope this helps a future user

  • In the TightVNC viewer you have to specify the port number, i.e. (yes, double colon)
    – user36573
    Nov 8, 2015 at 13:31
  • I find it baffling that I've gone through numerous tutorials that don't mention this fairly critical piece of information! Thank you.
    – Manachi
    Jan 13, 2020 at 8:09

I think that the number 0 of Xserver is for the real screen (HDMI on the real pi).
So, do not login to the GUI desktop after booting up. Or you can try to use :1 instead.

tightvncserver :1

Below is a config file for auto startup.

# Provides: tightvnc
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description: Start VNC Server at boot time.

# Set the VNCUSER variable to the name of the user to start tightvncserver under
eval cd ~$VNCUSER
case "$1" in
   su $VNCUSER -c '/usr/bin/tightvncserver :1 -geometry 1200x700 -depth 16 -pixelformat rgb565'
   echo "Starting TightVNC server for $VNCUSER "
   pkill Xtightvnc
   echo "Tightvncserver stopped"
   echo "Usage: /etc/init.d/tightvnc {start|stop}"
   exit 1
exit 0

Save this file to /etc/init.d/tightvnc, and add it to start-up list.

sudo chmod 755 tightvnc
sudo update-rc.d tightvnc defaults
  • Running OS X default VNC connection. After enabling VNC on Rpi Gui config I couldn't connect anymore... Starting TightVNC with :1 at Rpi command line fixed the issue for me. Auto start-up worked like a charm as well. Thanks!!
    – brasofilo
    Feb 14, 2017 at 3:33

After you install TightVNC on server(pi) and client(remote computer) you have to put a password on server end. Type vncpasswd in tight vnc server's terminal (i.e pi). Give a password and then try to login your pi.


This does NOT work. Many people (including myself) have tried, unsuccessfully.

If fact, it probably does work, but only if you try to connect as root, which is not a good idea, and not what most people expect.

tightvncserver can not share the user desktops until the user is logged in.

I suggest you first logon using ssh and start tightvncserver. You can then connect using a VNC client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.