I followed the instructions in the Adafruit tutorial for setting up vnc for my RPi (http://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc). VNC works great when launching vnc directly from the terminal (using vncserver :1). When I launch vncserver on boot (following the tutorial instructions):

[Desktop Entry]
Exec=vncserver :1

,I get only a black screen with an X cursor in my vncviewer. I've tried RealVNC on both Windows and Mac, and TightVNC on Windows. I'm using Raspbian on my RPi.

How do I fix the black screen when running vncserver on startup?


3 Answers 3


You can fix this by starting the VNC server when you log in (1st instruction set). This is due to a bug in the program.

You will have to SSH into your Raspberry Pi to log in, and this adds an extra layer of security.


Most display managers can be configured to have multiple X servers and on boxes with one or no monitors using Xvnc works well. The setup that I use has the advantage of using the main X configuration with out using xdmcp. I use xdm because it is the most configurable. here is my /etc/X11/xdm/Xservers file

:0 local /usr/bin/Xvnc4 :0 -nolisten tcp -desktop ben@crystal -rfbauth /home/ben/.vnc/passwd -geometry 1400x1050
:1 local /usr/bin/X :1 vt7 -nolisten tcp

Feel free to change the geometry to what ever you want. You would just need to generate a .vnc/passwd file and adjust the path to match. If you don't want a local X server comment out or delete the :1 line. Other display managers will probably work, but the configuration would be different.


Just for the record, it might help someone. I had a similar issue with my Rasperry Pi in the garden. For no apparent reason, two days after installation in the garden, my tightVNC session kept black with sometimes a rectangular part (20x20 pixels or so) of the desktop.

Bringing the Antenna, via USB-Extension cord, a bit closer to my home fixed the problem.

Sometimes, not always though, the fix is easy.

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.