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

  • 相关阅读:
    日记10硬件与操作系统安装专用
    程序设计与算法(三)C++面向对象程序设计 (北大MOOC)
    macbook pro14 前端基本配置【20211114】
    springboot配置rabbitmq的序列化反序列化格式
    sql优化把派生表改成子查询,查询速度将变快
    Android开发 因为ViewPager与SwipeRefreshLayout冲突导致RecyclerView或者其他列表布局的item无法点击的问题
    Kotlin开发 委托
    Kotlin开发 协程的实践 Retrofit + 协程 + ViewModel
    git clean用法
    kotlin开发 高阶函数学习与记录
  • 原文地址:https://www.cnblogs.com/softidea/p/4037133.html
Copyright © 2011-2022 走看看