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

  • 相关阅读:
    Linux软件安装【JDK安装】
    接口自动化<009>:Python 接口自动化Mock使用
    接口自动化<008>:Python 自定义装饰器
    接口自动化<007>:Python 装饰器 @functools.wraps(func)
    接口自动化<006>:Python 装饰器 @retry
    接口自动化<005>:Python中*args 和 **kwargs的用法详解
    接口自动化<004>:json.dumps()、json.loads()与json.dump()、json.load()
    接口自动化<003>:request部分参数解析
    pycharm常用设置及快捷键说明
    接口自动化<002>:session.request 会话用作前后文管理器
  • 原文地址:https://www.cnblogs.com/softidea/p/4037133.html
Copyright © 2011-2022 走看看