You'll need to enable auto-login for this to work, so don't do this if security is a concern. I do this over a wired network so I'm not too concerned about it. I can't take credit for almost all of this, but here's what I did.
To automatically login to the Pi:1. Edit /etc/inittab
a. Put a comment (#) in front of this line:
1:2345:respawn:/sbin/getty 115200 tty1
b....and add this below it (pi is the username):
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
To automatically load the desktop1. Edit /etc/rc.local
a. Add this above the
exit 0: line (pi is the username)
su -l pi -c startx
Install X11VNC Server on the PiIn a Terminal:
sudo apt-get install x11vnc
x11vnc -storepasswd
This will prompt you to create your VNC password. It will be stored in ~/.vnc/passwd
Now, create this directory:
/home/pi/.config/autostartYou need to know that the period in front of config means that
.config is a hidden folder. You can make your hidden directories visible by going to "View, Hidden Files and Folders" (or something like that). Inside the
autostart directory, create the file
X11vnc.desktop This filename MUST end with .desktop
The contents of
X11vnc.desktop should be:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=x11VNC
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
Terminal=false
StartupNotify=false
Hidden=false
That's it! Go ahead and reboot.
Now, from your VNC Client, type in the IP address of your PI and you'll connect to it. It will ask you for your password, and then a few seconds later, you're in. I do get an error message that I don't have the proper VNC version, but I ignore it. This has worked for me for almost 2 months with no problems.