2

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]
Type=Application
Name=TightVNC
Exec=vncserver :1
StartupNotify=false

,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?

Bex
  • 2,929
  • 3
  • 25
  • 34
Michelle
  • 21
  • 1
  • 1
  • 2

3 Answers3

1

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.

syb0rg
  • 8,188
  • 4
  • 37
  • 51
1

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.

hildred
  • 916
  • 1
  • 6
  • 20
0

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.

Ghanima
  • 15,855
  • 15
  • 61
  • 119