Experimental Environment
Server:centos 6.5 x86_64
Client:windows 7
Installing and configuring VNC
1. [[email protected] ~]# Yum install tigervnc-server-y
2. Modify the VNC master configuration file
[[Email protected]~]# vim/etc/sysconfig/vncservers
Find the last two lines, remove the comments, and change to
Vncservers= "1:root" # # #第一个远程连接的账户为root
vncserverargs[1]= "-geometry1200x900"
# # #root远程登录分辨率为1200x900
3. start VNC
[[Email protected]~]# vncserver
Youwill require a password to access your desktops.
Password: # # #这里输入连接远程桌面的密码
Verify: # # #再次输入密码
Xauth: (stdin): 1:bad display Name "Gxh:1" in "Add" command
New ' gxh:1 (root) ' Desktop is gxh:1
Creatingdefault Startup Script/root/.vnc/xstartup
Startingapplications specified In/root/.vnc/xstartup
Logfile Is/root/.vnc/gxh:1.log
4. Modify the Xstartup file
[Email protected]~]# vim. Vnc/xstartup
Comment out the last two lines and add the following on the last line:
#xterm-geometry 80x24+10+10-ls-title "$VNCDESKTOP Desktop" &
#twm &
gnome-session&
5. Set Vncserver boot
[[Email protected]~]# chkconfig vncserver on
6. Setting up a firewall
Vncserver listening port starting from 5900, display:1 monitoring 5901,display:2 monitoring 5902, and so on.
[[Email protected]~]# iptables-i input-m State--state new-m tcp-p TCP--dport 5901-j ACCEPT
[[Email protected]~]# service Iptables Save
7. VNC Server configuration complete
Client
8. Installing the VNC client
1.9. remotely connect to a VNC server
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8C/D7/wKioL1h7RryyzC25AABTM0jHfjo753.png-wh_500x0-wm_ 3-wmp_4-s_3540894085.png "title=" V.png "alt=" Wkiol1h7rryyzc25aabtm0jhfjo753.png-wh_50 "/>
Extended Command
Add a display
[Email protected] ~]# Vncserver
Xauth: (stdin): 1:bad display Name "Gxh:2" in "Add" command
New ' gxh:2 (root) ' Desktop is Gxh:2
Starting applications specified In/root/.vnc/xstartup
Log file Is/root/.vnc/gxh:2.log
List all display
[Email protected] ~]# vncserver-list
TigerVNC Server Sessions:
X DISPLAY # PROCESSID
: 1 2403
: 2 2998
Close a display
[Email protected] ~]# Vncserver-kill:2
Killing Xvnc process ID 2998
[Email protected] ~]# vncserver-list
TigerVNC Server Sessions:
X DISPLAY # PROCESSID
: 1 2403
Modify Remote login password
[Email protected] ~]# VNCPASSWD
Password:
Verify:
VNC Client Software recommendations
VNC Viewer
TightVNC
RealVNC
TigerVNC
This article from "Rookie of the World" blog, please be sure to keep this source http://guoxh.blog.51cto.com/10976315/1892103
CentOS 6.5 Installation and configuration vnc!!!