zoukankan      html  css  js  c++  java
  • 如何让vnc控制由默认的twm界面改为gnome?(转)

    其实只要修改用户 .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

  • 相关阅读:
    在DataList控件中删除数据记录
    java中进行二进制,八进制,十六进制,十进制间进行相互转换
    Java中重载重写
    WCF 第七章 寄宿 在Windows 进程激活服务中寄宿服务
    .NET 中的十进制浮点类型(译文)
    .NET 中的二进制浮点类型(译文)
    WCF 第六章 序列化和编码 总结
    WCF 第六章 序列化和编码 为自定义序列化使用XmlSerializer
    WCF 第七章 寄宿 在IIS7中寄宿服务
    WCF 第七章 寄宿
  • 原文地址:https://www.cnblogs.com/softidea/p/4037133.html
Copyright © 2011-2022 走看看