The method of VNC remote login to the graphical interface of Raspberry Pie;
You need to use the command line to install VNC. If you need to install VNC remotely, you must log in to the command line interface through SSH.
fixed
Raspberry pie command line:
Sudo apt-get install tightvncserver
After installation, please use this command to set the VNC password first:
vncpasswd
Enter the operation password twice first, and then ask whether to set a read-only password. Suit yourself, it is generally unnecessary. )
Boot automatic start
To set the boot, you need to create a file in /etc/init.d/. For example, tightvncserver:
(Note: The name of the startup script is the same as the program name. )
sudo nano/etc/init . d/tightvncserver
The content is as follows: (right-click = paste in the putty window) #! /bin/sh
# # # Start initializing information
# Provides: tightvncserver
# required -Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Brief Description: Start/Stop tightvncserver
# # # End initialization information
# For more details, see:
# /software/ 19334.html
Attachment: Manual startup and parameters (the following are of little use, please skip if you are not interested)
Use this command to manually start the VNC server program:
1
Tightvncserver- geometry 800x600: 1
If you start it for the first time and you don't use the vncpasswd command to set a password, the program will ask you to set a password.
It's very convenient to boot. If there is no reason, it is really not recommended to start manually.
Command line parameter description:
1.: 1, specifying the number of the console.
Starting multiple consoles can provide multiple desktop environments that do not affect each other. (Most people don't need multi-user operation, so it's meaningless. )
Without this parameter, tightvncserver will automatically find the next idle console from 1.
With this parameter, the specified console will be forced to use, and an error will be reported if the console is already started. Adding this parameter can effectively prevent the system resources from being wasted by unintentionally starting the program many times (which will start multiple consoles).
Special console 0
Console 0 is a desktop that is connected to a real display and actually outputs images.
For VNC clients, by default, it is convenient to log in to console 0 without entering a port number.
However, because 0 is a real desktop, there is a lengthy conflict with booting the desktop environment or using the startx command yourself.
It turned out to be a problem. Therefore, the console 1 is always used in the automatic startup configuration tutorial.
Second,-geometry 800×600, resolution. You don't have to add it.
Terminate VNC console:
tightvncserver -kill : 1
View the list of running consoles:
1
ps ax | grep Xtightvnc | grep -v grep
pass