配置文档,+VNCViewer软件
准备工作:(默认在root下操作)
在需要生产的服务器端安装VNC服务以及新建多用户:
【安装VNC服务】yum -y install vnc-server vnc
【新建用户user1 user2 user3 】
一、先安装vncserver,并将vncserver设为自启动:
[root@CentOS ~]#chkconfig --level 345 vncserver on

二、修改配置文件,设置可通过VNC客户端登陆的用户:
[root@CentOS ~]#vi /etc/sysconfig/vncservers
修改vnc配置文件为:
# 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
# 《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 “-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”
VNCSERVERS=“1:user1 2:user2 3:user3”
VNCSERVERARGS[1]=“-geometry 800x600”
VNCSERVERARGS[2]=“-geometry 800x600”
VNCSERVERARGS[3]=“-geometry 800x600”
# VNCSERVERARGS[2]=“-geometry 800x600 -nolisten tcp -nohttpd -localhost”
说明:VNCSERVERS为可通过VNC客户端远程登陆的用户,添加其他用户需要按序号添加。
格式为:1:user1 2:user2 3:user3 【序号】:username
注:前面的数字为桌面号,且一一对应。
若此时启动VNC服务的话且序号为【1】的用户为root用户,那么当前启动其他登录用户进入的是root用户桌面。
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !