centos 6.7 tigervnc 安装

# yum install -y tigervnc tigervnc-server
# rpm -ql tigervnc-server
/etc/rc.d/init.d/vncserver
/etc/sysconfig/vncservers
/usr/bin/Xvnc
/usr/bin/vncconfig
/usr/bin/vncpasswd
/usr/bin/vncserver
/usr/bin/x0vncserver
/usr/share/man/man1/Xvnc.1.gz
/usr/share/man/man1/vncconfig.1.gz
/usr/share/man/man1/vncpasswd.1.gz
/usr/share/man/man1/vncserver.1.gz
/usr/share/man/man1/x0vncserver.1.gz
#----------------------------------------------------------------------------------
# vi /etc/sysconfig/vncservers 

# 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 will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, see this URL:
# https://access.redhat.com/knowledge/solutions/7027

# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

# 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"
VNCSERVERS="2:root"(这里是2 但登陆的是侯为VNC server:192.168.1.9:1)
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
~ 

---------------------------------------------------网文截取--------------------------------------------------------------------------

http://www.cnblogs.com/kerrycode/p/3315793.html

将最后两行配置信息取消注释,添加系统账号

VNCSERVERS="1:root 2:etl"

VNCSERVERARGS[1]="-geometry 1024x768 -nolisten tcp -nohttpd "

VNCSERVERARGS[2]="-geometry 1024x768 -nolisten tcp -nohttpd "

VNCSERVERS 是用来设定可以使用VNC的服务器账号,可以设定多个,例如上面root、etl,但是中间要用空格隔开。使用VNCVIEWER登录时,192.168.48.128:1表示是以root账号登录,以此类推。

---------------------------------------------------------------------------------------------------------------------------------------

 

[root@666 ~]# /usr/bin/vncserver 
xauth:  creating new authority file /root/.Xauthority

New '666:1 (root)' desktop is 666:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/666:1.log

[root@666 ~]# ps -ef|grep vnc
root      4731     1  0 18:52 pts/1    00:00:00 /usr/bin/Xvnc :1 -desktop 666:1 (root) -auth /root/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -fp catalogue:/etc/X11/fontpath.d -pn
root      4737  4736  0 18:52 pts/1    00:00:00 vncconfig -iconic
root      4892  4594  0 18:53 pts/1    00:00:00 grep vnc

[root@666 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Flushing firewall rules: [  OK  ]
iptables: Unloading modules: [  OK  ]
[root@666 ~]# setenforce 0

VNC server:192.168.1.9:1(不知为什么我写的是2,这里为什么是1)

 

[root@666 ~]# service vncserver status
Xvnc (pid 4731) is running...

 =================================================

[root@k ~]# vncserver 

You will require a password to access your desktops.

Password:
Verify:
xauth:  creating new authority file /root/.Xauthority

New 'k:2 (root)' desktop is k:2

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/k:2.log

#第一次输入的时候要设置密码

 

posted @ 2016-04-22 19:27  bass  阅读(341)  评论(0)    收藏  举报