ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 配置linux远程管理 VNC

配置linux远程管理 VNC

原创 Linux操作系统 作者:myownstars 时间:2011-04-21 15:29:02 0 删除 编辑

检查VNC软件安装包

[root@rac2 oracle]#  rpm -qa | grep vnc

vnc-4.0-12.el4_7.1

vnc-server-4.0-12.el4_7.1

已经安装,则开启VNC服务

[root@rac2 oracle]# /etc/init.d/vncserver start

Starting VNC server: [  OK  ]

运行vncserver且输入密码

[root@rac2 oracle]# vncserver

 

You will require a password to access your desktops.

 

Password:

Verify:

 

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

 

Creating default startup script. /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/rac2:1.log

此时在win端开启vnc viewer, 并输入linux服务器地址*.*.*.*:1

要求输入刚刚的口令

即可看到远程的Linux窗口,为了窗口看起来更舒服点,可以配置以下文件

[root@rac2 oracle]# cat /root/.vnc/xstartup

#!/bin/sh

 

# Uncomment the following two lines for normal desktop:

# unset SESSION_MANAGER

# exec /etc/X11/xinit/xinitrc

 

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

twm &

[root@rac2 oracle]# vi /root/.vnc/xstartup

 

#!/bin/sh

 

# Uncomment the following two lines for normal desktop:

unset SESSION_MANAGER

exec /etc/X11/xinit/xinitrc

 

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

twm &

Entering Ex mode.  Type "visual" to go to Normal mode.                                                           

:wq

"~/.vnc/xstartup" 12L, 330C written

[root@rac2 oracle]# vncserver

 

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

 

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/rac2:2.log

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-693097/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-03-18

  • 博文量
    375
  • 访问量
    3120677