Full width home advertisement

Arduino project

Raspberry project

Post Page Advertisement [Top]

This guidance is from Raspberry Document (LINK HERE) but with some adjusting

1. Install TightVNC in Raspberry PI
2. Install TightVNC in Window 7
3. Test connection
4. Make auto-boot function


1. Install TightVNC package:
In Raspberry, type command:
$ sudo apt-get install tightvncserver

Make new section, which will ask you to make new password for connection
$ tightvncserver
It will show result:
root@raspberrypi:~# tightvncserver

New 'X' desktop is raspberrypi:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/raspberrypi:1.log


2. Install TighVNC on Window 7
On Window 7, download TightVNC from tightvnc.com, then install on Window 7

3. Test connection
To test, in Raspberry, run:
$ vncserver :1 -geometry 1200x800 -depth 24

In window, open TightVNC to connect it by Rasp IP address (mine is 192.168.1.71)

Type password is set on Step 1

After connection successful, result as here:
Tips: sometimes TighVNC can't connect to Rasp even Rasp is OK, to solve it: ping to Rasp to make sure connection is OK, then connect Rasp TightVNC

4. Make auto-boot function
Make auto-boot file -> so that, every time Rasp start up, we can connect it without any touching the board
In Raspberry, create new file name (for example): vncboot
$ gedit etc/init.d/vncboot

Copy and paste following code:
#! /bin/sh
# /etc/init.d/vncboot

### 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

USER=pi
HOME=/home/pi

export USER HOME


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

exit 0

Save it, then change file mode:
$ chmod 755 vncboot

Done! Now, Rasp can be connected by another computer, no need to touch the board any more!



No comments:

Post a Comment

Bottom Ad [Post Page]