Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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 192.168.0.200" 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
add comment

2 Answers

Configure your firewall right and unblock port 5901.

share|improve this answer
add comment

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.

### BEGIN INIT INFO
# 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.
### END INIT INFO

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

USER=root
HOME=/root

export USER HOME

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

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

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

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
add comment

Your Answer

 
discard

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.