码迷,mamicode.com
首页 > 其他好文 > 详细

如何让vnc控制由默认的twm界面改为gnome?(转)

时间:2014-10-20 14:55:43      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:des   blog   http   io   os   ar   for   sp   文件   

其实只要修改用户 .vnc目录下的xstartup配置文件即可

[root@localhost ~]# more /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" &
exec /etc/X11/xinit/xinitrc

将最后一样twm & 换成 exec /etc/X11/xinit/xinitrc 即可

http://blog.sina.com.cn/s/blog_5d9db4050100gf8n.html

继续启动vncserver,可能还有错误,如下

vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: Listening for HTTP connections on port 5801
vncext: created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!

Fatal server error:
could not open default font ‘fixed‘
xsetroot: unable to open display ‘localhost.localdomain:1‘
vncconfig: unable to open display "localhost.localdomain:1"
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can‘t open display: %s 


原因:vncserver默认寻找的X系统的字体路径在/usr/X11R6/lib/X11/fonts/下,但RHEL5却在/usr /share/X11/fonts/下
解决:mkdir /usr/X11R6/lib
cd /usr/X11R6/lib
ln -s /usr/share/X11 X11

 

 

http://blog.csdn.net/kkk8000/article/details/6172698

 

如何让vnc控制由默认的twm界面改为gnome?(转)

标签:des   blog   http   io   os   ar   for   sp   文件   

原文地址:http://www.cnblogs.com/softidea/p/4037133.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!