Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Raspberry Pi once upon a time was able to VNC perfectly but then it just stopped. Tightvncserver works but when i do "netstat | grep 5901" the connection doesn't show up. I try using "tightvncviewer" but nothing shows up either. However I am able to use the ssh service on my Raspberry Pi. I am using Remmina Remote Desktop Client to try to access it on Ubuntu 12.10.

share|improve this question

Configure your firewall right and unblock port 5901.

share|improve this answer

Are you sure that VNC is running? By default VNC does not normally run automatically. So you may have been setting it up and started to run it. Then when your RPi was restarted, VNC was not automatically restarted.

Here is how to configure VNC to run on startup.

Create a file in /etc/init.d with a suitable name such as vncboot with the following content.

# Provides: vncboot
# 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.

#! /bin/sh
# /etc/init.d/vncboot


export USER HOME

case "$1" in
   echo "Starting VNC Server"
   #Insert your favoured settings for a VNC session
   /usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565

   echo "Stopping VNC Server"
   /usr/bin/vncserver -kill :0

   echo "Usage: /etc/init.d/vncboot {start|stop}"
   exit 1

exit 0

Modify the file permissions so it can be executed

chmod 755 /etc/init.d/vncboot

Enable dependency based boot sequencing

update-rc.d /etc/init.d/vncboot defaults

If enabling dependency based boot sequencing was successful, it says

update-rc.d: using dependency based boot sequencing

But if it says

update-rc.d: error: unable to read /etc/init.d//etc/init.d/vncboot

then try the following command

update-rc.d vncboot defaults

Reboot your Raspberry PI and you should find a vncserver already started.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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