好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Linux学习一——vnc远程学习 - Linux操作系统:Ubu


Linux 学习一——vnc远程学习

 

vnc安装 

Shell代码  

[root@SC-026 ~]# yum install vnc  

  www.2cto.com  

vnc远程连接 

首先ssh登录到远程机器上,用命令vncserver为当前用户开放一个端口 

退出后,在利用命令vncviewer连接到远程机器上,就可以进行各种操作。 

Shell代码  

[root@SC-026 ~]# ssh 192.168.15.182  

root@192.168.15.182's password:   

Last login: Sat Oct 27 00:30:02 2012 from sfserver20.localdomain  

 

远程机器开端口 

Shell代码  

[root@sfserver20 ~]# vncserver -geometry 1600x900 :3  

  

New 'sfserver20.localdomain:3 (root)' desktop is sfserver20.localdomain:3  

  

Starting applications specified in /root/.vnc/xstartup  

Log file is /root/.vnc/sfserver20.localdomain:3.log  

  www.2cto.com  

关闭端口 

Shell代码  

[root@sfserver20 ~]# vncserver -kill :3  

Killing Xvnc process ID 29665  

 

如果登录想看到桌面形式,需要修改一下文件 

Shell代码  

[root@sfserver20 ~]# vim .vnc/xstartup   

 

最后一行注释掉,再新增加一行如下: 

#twm & //注释掉 

gnome-session & //表示远程用户登录Linux的GNOME桌面 

或startkde & //表示远程用户登录Linux的KDE桌面,不如上一次效果好 

  www.2cto.com  

退出,从端口进入: 

Shell代码  

[root@sfserver20 ~]# exit  

[root@SC-026 ~]# vncviewer 192.168.15.182:3  

  

VNC Viewer Free Edition 4.1.2 for X - built Jul 27 2010 10:24:13  

Copyright (C) 2002-2005 RealVNC Ltd.  

See http://www.realvnc.com for information on VNC.  

  

Thu Nov  1 15:54:10 2012  

 CConn:       connected to host 192.168.15.182 port 5903  

 CConnection: Server supports RFB protocol version 3.8  

 CConnection: Using RFB protocol version 3.8  

 

出现以下界面,输入密码即可以桌面形式登陆到远程机器上。



 

查看更多关于Linux学习一——vnc远程学习 - Linux操作系统:Ubu的详细内容...

  阅读:59次