远程桌面环境在许多情况下能够带来优点,关于一般的公司来说,开发人员一般都会有一台工作机一起有一台开发机,有时,开发机和工作机不在同一个当地,假如需求一起操作两台机器,那么在不同的地址之间来回走动必定带来许多的不方便。能够运用telnet或ssh等字符登陆界面,这关于了解shell指令的开发者来说是比较省劲的办法,最好的办法是运用远程桌面环境。
下面的进程发动VNC服务器端的vncserver服务:
1. 运用vncpasswd指令设置一个vnc server暗码。假如不设置暗码,vncserver将无法发动。
2. 修改/etc/sysconfig/vncservers配置文件。下面的文件为一个实例:
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# 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
# .
VNCSERVERS=1:fred 2:joe
# fred’s VNC options
VNCSERVERARGS[1]=-geometry 1024×768
# joe’s VNC options
VNCSERVERARGS[2]=-geometry 1280×1024
其间VNCSERVERS变量表明供给几个桌面和每个桌面的用户名。VNCSERVERARGS是发动vncserver时的参数,一般只需设置分辨率就足够了。
3. 运用chkconfig vncserver on指令使体系开机时发动vncserver。
4. 运用service vncserver start指令当即发动vncserver。
5. VNC的默许桌面是一个十分简略的环境,即twm窗口管理器。假如要使VNC看起来和本地登陆界面差不多,能够修改~/.vnc/xstartup文件,并将文件中
Uncomment the following two lines for normal desktop
后边的两行撤销注解。
在客户端需求运用vncview软件来连接到vncserver上,能够到http://www.tightvnc.com/download.html#stable上下载tightvnc的window客户端软件。发动vncviewer之后,在VNC server提示处输入
10.239.56.94:1
其间,前者为vncserver的IP地址,后者是需求登陆的VNC桌面。在输入暗码后,VNC远程桌面环境就呈现了。快捷键Ctl+Alt+Shift+F能够进行全屏和非全屏的切换。