Chinaunix首页 | 论坛 | 博客
  • 博客访问: 83929
  • 博文数量: 32
  • 博客积分: 1505
  • 博客等级: 上尉
  • 技术积分: 315
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-04 14:41
文章分类

全部博文(32)

文章存档

2012年(1)

2011年(1)

2010年(1)

2008年(29)

我的朋友

分类: LINUX

2008-09-19 11:16:47

root@db ~]# vncserver

You will require a password to access your desktops.

Password:
Verify:

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


Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/db:1.log

[root@db ~]# cd

[root@db .vnc]# 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 &
gnome-session &
~
~
~
[root@db .vnc]# vncserver -fp /usr/X11R6/lib/X11/fonts/misc/

New 'db:2 (root)' desktop is db:2  (db:2 是指 主机的端口为 5800+2  所以端口为:5802)

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/db:2.log

[root@db .vnc]#




在linux上执行:

vncserver

提示输入密码(这就是以后远程控制这个linux的密码)

可以使用vncpasswd修改密码

在win端执行vnc查看器,输入:serverIP:X

这个“X”就是执行vncserver命令的时候的输出,例如:

New 'X' desktop is rh9:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/rh9:2.log

那么,X就是2,rh9是服务器(linux)名称

OK,可以开始远程控制linux啦~~~~~~
阅读(846) | 评论(0) | 转发(0) |
0

上一篇:linux mount ISO

下一篇:linux 限制telnet

给主人留下些什么吧!~~