a brief introduction to VNC
VNC is a free open source software based on Linux operating system, powerful and efficient remote control, and its performance can be comparable with any remote control software in Windows and MAC. In Linux, VNC consists of the following four commands: VNCSERVER,VNCVIEWER,VNCPASSWD, and Vncconnect. In most cases, users only need two of these commands: Vncserver and Vncviewer
VNC is basically made up of two parts: the client application (vncviewer) andthe server-side application (vncserver). The basic operating principle of VNC is similar to some remote control software under Windows. VNC's server-side applications are highly adaptable in UNIX and Linux operating systems, and the graphical user interface is very friendly and looks similar to the software interface under Windows. Computers in any Linux platform with client-installed applications (vncviewer) can be easily connected to computers with server-side applications (Vncserver) installed
(PS: Refer to the above introduction to Baidu Encyclopedia)
Two service-side installation of VNC
Here, I will install the VNC server program on the remote Linux host and then install the VNC client on my own laptop in Windows, and finally make a remote Desktop Connection
(1) server-side installation:
[[email protected] ~]# rpm-q vnc-serverpackage vnc-server is not installed[[email protected] ~]# yum install VNC vnc-serv Er
(2) Set Password:
[Email protected] ~]# vncserveryou would require a password to access your desktops. Password:verify:
It is important to note that we need to use this password when we make a remote connection at a later time.
(3) Modify the support for GNOME desktop style:
Modify the last line of the/root/.vnc/xstartup file to:
Gnome-session &
This configuration is done after the modification:
[Email protected] system]# vim ~/.vnc/xstartup#!/bin/shunset session_managerunset dbus_session_bus_addressexec/etc/ X11/xinit/xinitrcgnome-session &
(4) Modify the VNC login account and Resolution:
[Email protected] system]# Vim/lib/systemd/system/[email protected]
Then add the following content:
vncservers= "1:root" vncserverargs[1]= "-geometry 1024x768"
Note: Here is only set up an account login, its setting resolution is 1024x768, if you need to configure multiple accounts, the following format configuration.
vncservers= "1:user1 2:user2 3:user3″
vncserverargs[1]= "-geometry 1024x768″
vncserverargs[2]= "-geometry 1024x768″
vncserverargs[3]= "-geometry 800x600-depth 24-nolisten tcp-nohttpd-localhost"
(5) Start the VNC service:
[[email protected] ~]# vncservernew ' app05.prd.zifangsky.cn:2 (root) ' Desktop is app05.prd.zifangsky.cn:2starting Applications specified In/root/.vnc/xstartuplog file Is/root/.vnc/app05.prd.zifangsky.cn:2.log
Note: From the start prompt above we can know that the ID of this boot is 2, so when we want to end this service we can use the following command:
[Email protected] ~]# Vncserver-kill:2
three VNC client Installation
After we have installed and started VNC on the server, we can install the VNC client on the other machine and connect it remotely.
(1) Download the VNC viewer for the corresponding platform:
: https://www.realvnc.com/download/
(2) Remote connection:
It is important to note that the VNC server will listen to Port 5901 , and since I am connected to the servers in the remote intranet, I first use theSSH Secure Shell Client After the SSH connection, then the local 5901 port is forwarded:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/85/84/wKiom1em96yArHNfAABo_2GPoAc548.png "title=" 20160611164246923.png "alt=" Wkiom1em96yarhnfaabo_2gpoac548.png "/>
This is followed by a connection using the VNC viewer:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/85/83/wKioL1em98XzT7mwAABW9N9jGNo085.png "title=" 20160611164416380.png "alt=" Wkiol1em98xzt7mwaabw9n9jgno085.png "/>
The password you enter here is the one we set up at the beginning of the VNC server.
After the final connection succeeds, the effect is the following:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/85/83/wKioL1em99-Dh1EwAAPHRCEmeQE040.png "title=" 20160611164529605.png "alt=" Wkiol1em99-dh1ewaaphrcemeqe040.png "/>
This article is from "Zifangsky's personal blog" blog, make sure to keep this source http://983836259.blog.51cto.com/7311475/1835381
Latest installation of VNC on a Linux server and Remote Desktop Connection