一、环境和软件准备html
(1) CentOS 6.5下服务器
1 [root@localhost ~]$ rpm –q tigervnc tigervnc-server 2 tigervnc-1.0.90-0.17.20110314svn4359.el6.i686 3 tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686
使用以下命令,进行安装session
1 yum install tigervnc 2 yum install tigervnc-server
(2) Windows 7下svn
tigervnc-1.2.0.exe,在http://sourceforge.net/projects/tigervnc/下载工具
二、启动vncserver(服务器端)ui
1 vncserver :n
这里的n是sessionnumber,不指定默认为1,也能够是二、3等等。第一次会提示输入密码,之后能够使用vncpasswd命令修改密码。spa
三、启动vncviewer(客户端).net
vncviewer localhost:n
这里的n对应vncserver指定的数字,若是使用Xmanager等工具,在Windows下就自动弹出CentOS的桌面,这里咱们改用tigervnc-1.2.0.exe。unix
四、启动tigervnc的Windows版本(tigervnc-1.2.0.exe)code
VNC的默认端口是5900,而远程桌面链接端口则是5900+n(n是vncserver命令指定的)。若是使用“vncserver :1”命令启动VNC Server,那么下面的端口应该是5901。
点击“OK”,提示输入密码后,就能够看到CentOS的桌面了。
五、关闭vncserver(服务器端)
若是使用vncserver :n屡次创建远程桌面,能够用
vncserver –list
列出当前用户创建的全部远程桌面,例如
[root@localhost ~]$ vncserver -list TigerVNC server sessions: X DISPLAY # PROCESS ID :1 14174
参考资料:
一、http://heather.cs.ucdavis.edu/~matloff/vnc.html
二、http://blog.chinaunix.net/uid-26642180-id-3135447.html
三、http://blog.csdn.net/daydreamingboy/article/details/8196747/#