In the operation of the work process, sometimes we need to use VNC to connect to the Linux server, such as: Finance to install a Kingdee financial software, but also required in the computer room. When this perverted software starts, it needs us to click on its graphical interface to launch it. At this point, vnc comes in handy.
A. Configuration file
# The Vncservers variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on Display:2
# as my ' myusername ' (adjust this to your own). You'll also
# need to set a VNC password; Run ' man vncpasswd ' to see how
# to does that.
#
# do not RUN the this SERVICE if your the local area network is
# untrusted! For a secure-to-the-using VNC, see
# <url:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# use "-nolisten TCP" to prevent X connections to your VNC server via TCP.
# Use the "-nohttpd" to prevent web-based VNC clients connecting.
# use "-localhost" to prevent remote VNC clients connecting except when
# Doing so through a secure tunnel. See the '-via ' option in the
# ' Man vncviewer ' manual page.
# vncservers= "2:myusername"
# vncserverargs[2]= "-geometry 800x600-nolisten tcp-nohttpd-localhost"
Vncservers= "1:root"
vncserverargs[1]= "-geometry 800x600"
Two. Start
[Email protected] ~]#/etc/init.d/vncserver restart
Shutting down VNC server:1:root [OK]
Starting VNC Server:1:root
New ' demo:1 (root) ' Desktop is demo:1
Starting applications specified In/root/.vnc/xstartup
Log file Is/root/.vnc/demo:1.log
[OK]
2. Review the process:
[[email protected] ~]# Netstat-ntupl|grep VNC
TCP 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN 25350/xvnc
TCP 0 0 0.0.0.0:5802 0.0.0.0:* LISTEN 24658/xvnc
TCP 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 25350/xvnc
TCP 0 0 0.0.0.0:5902 0.0.0.0:* LISTEN 24658/xvnc
TCP 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 25350/xvnc
TCP 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 24658/xvnc
TCP 0 0::: 6001:::* LISTEN 25350/xvnc
TCP 0 0::: 6002:::* LISTEN 24658/xvnc
This article from the "8055082" blog, reproduced please contact the author!
Linux operating system installation configuration VNC