Hardware platform: Raspberry Pi 2, Model B, 1GB RAM
Mirror version: 2015-11-21-raspbian-jessie.img source Download Interface: http://www.tightvnc.com/download-old.php
Introduction: First you need to install and start the VNC service on the raspberry pie, and then connect through the VNC client.
The need to use the command line is to install VNC on the raspberry pie. If you need to remotely operate VNC, you must log on to the command line interface via SSH (Raspbian's default username is: pi, the default password is: Raspberry).
Installation
Command Line Input:
sudo apt-get install Tightvncserver
1 1
Once installed, be sure to use this command to set up a VNC password:
vncpasswd
1 1
(Enter the operation password two times, and then ask whether to set a view (view-only) password, according to their favorite, generally not necessary. )
Setting up Boot
Set up to boot up, you need to create a file in/etc/init.d/. For example Tightvncserver:
(Note: The name of the startup script that has the same custom as the program name)
sudo vi/etc/init.d/tightvncserver
1 1
The contents are as follows:
#!/bin/sh ### BEGIN INIT INFO # provides:tightvncserver # Required-start: $local _fs # Required-stop: $loc AL_FS # Default-start:2 3 4 5 # default-stop:0 1 6 # short-description:start/stop Tightvncserver ### End INIT INFO # More details, # HTTP://WWW.PENGUINTUTOR.COM/LINUX/TIGHTVNC ### Customize This entry # Set the USER variable t o The name of the user to start Tightvncserver under Export user= ' pi ' ### end customization required eval CDs ~ $USER case "In Start" starts the command line.
Here, customize the resolution, console number, or other parameters.
Su $USER-C '/usr/bin/tightvncserver-depth 16-geometry 800x600:1 ' echo ' starting TightVNC server for $USER ";; Stop) # terminates the command line.
The console number here is the same as the start.
Su $USER-C '/usr/bin/tightvncserver-kill:1 ' echo "Tightvncserver stopped";;
*) echo "Usage:/etc/init.d/tightvncserver {start|stop}" exit 1;; ESAC Exit 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18-------------19 20 21 22 23 24 25 26 27-28 29 30 31, 32 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
(Note: The value of the user variable is the default username, here is pi.) )
Then give the Tightvncserver file permission to execute:
sudo chmod 755/etc/init.d/tightvncserver
1 1
and update the boot list:
sudo update-rc.d tightvncserver defaults
1 1
Restart Raspberry pie:
sudo shutdown-r now
1 1
Manually start
Of course, you can also manually start the VNC server program by using the following command:
Tightvncserver-geometry 800x600:1
1 1
If you start the first time and you have not used the VNCPASSWD command to set a password, the program asks you to set a password. Start-up is very convenient, so it is recommended to boot.
Command parameter Description:
One,: 1, specify the number of the console.
Start multiple consoles to provide multiple desktop environments that do not affect each other. Without this parameter, Tightvncserver will automatically look for the next idle console starting with 1. With this parameter, the specified console is enforced and the error occurs if the console is already started. Adding this parameter is an effective way to avoid wasting system resources by accidentally starting a program (which starts multiple consoles).
The special number No. 0 Console--0 is the desktop that connects the actual display image of the real monitor. For VNC clients, do not enter the port number login, the default login to the No. 0 console, convenient. But because number No. 0 is the real desktop, there is a conflict with the boot desktop environment. Therefore, the 1th console is used in the automatic boot configuration tutorial.
Second,-geometry 800x600, resolution. Can not add.
Terminate VNC console:
Tightvncserver-kill:1
1 1
VNC Client Login
Download vnc-viewer:http://www.realvnc.com/download/viewer/
Login address Enter "IP Address: Console number", the number No. 0 console can not be added.