Chinaunix首页 | 论坛 | 博客
  • 博客访问: 925383
  • 博文数量: 162
  • 博客积分: 6207
  • 博客等级: 准将
  • 技术积分: 1687
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-10 01:36
个人简介

80后技术男

文章分类

全部博文(162)

文章存档

2013年(6)

2012年(20)

2011年(24)

2010年(8)

2009年(13)

2008年(37)

2007年(35)

2006年(19)

分类: LINUX

2007-03-07 09:12:06

配置文件

vi /etc/sysconfig/vncservers

添加需要启用vnc服务的用户和服务号

修改如下

 VNCSERVERS="1:root"
保存退出

然后执行vncpasswd命令创建启用vnc服务的用户的密码

执行完后会在用户相应的家目录下创建vnc目录

编辑xstartup文件
替换最后一行为
gnome-session &

保存退出
重启vnc服务即可,登陆时候客户端输入ip:1(对应的vnc号)



以下为参考资料

2、进入我的Linux帐户(我用的是root),编辑主目录下的.vnc/xstartup为如下内容:
gnome桌面的配置文件如下:
#!/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" &
gnome-session &

配置成kde桌面的配置文件如下:
#!/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
startkde &
我用的是KDE。
3、在我的帐户中打开终端,运行vncserver -depth 24 -geometry 1024x768,(第一次使用可能会要求输入授权密码,以后要改动的话可以用vncpassword命令),会显示类似下面的提示:
New 'lint:1 (lint)' desktop is root:1
Starting applications specified in xxx/.vnc/xstartup
Log file is xxx:1.log
说明Server1已经创建成功,这时应该已经开始启动同帐户的VNC Server了。


阅读(2085) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~