免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1371 | 回复: 0
打印 上一主题 下一主题

vnc的设置和使用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-19 11:16 |只看该作者 |倒序浏览
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啦~~~~~~
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/10070/showart_1206048.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP