其实只要修改用户 .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?(转)的更多相关文章

  1. OpenMesh 将默认的 float 类型改为 double 类型

    OpenMesh 中默认的数据类型都是 float 类型的,如果要将其默认的 float 类型改为 double 类型,可以这么做: #include <OpenMesh/Core/Mesh/P ...

  2. CentOS 默认进入图形界面与文本界面

    查看/etc/inittab文件,得到以下信息: # inittab is no longer used when using systemd.## ADDING CONFIGURATION HERE ...

  3. Chrome默认搜索引擎被窜改

    折腾了几个安全软件之后,Chrome浏览器默认搜索引擎被窜改,且无法删除,提示“管理员安装”,另外在插件栏出现了一个unTabs的东西,也无法删除,“受政策保护之类的”.搜索后找到一篇文章“Unabl ...

  4. centos7版本设置OS启动默认进入图形界面还是文本界面

    相比7之前的版本,在centos7版本中,设置OS启动默认进入图形界面还是文本界面有了点变化 检查当前默认设置 [root@rems2 ~]# systemctl get-default graphi ...

  5. ubuntu设置开机默认进入字符界面方法 ubuntu 12.04 桌面版关闭图形界面(转)

    ubuntu 12.04 桌面版关闭图形界面 注意]改GRUB 的配置文件(不建议直接改 grub.conf) file:/etc/default/grub GRUB_CMDLINE_LINUX_DE ...

  6. js控制5秒返回指定界面,或上一个界面

    js控制5秒返回指定界面,代码如下 <head> <meta http-equiv="Content-Type" content="text/html; ...

  7. Ubuntu 14.04默认以字符界面启动

    在windows上跑虚拟机比较资源,特别当以图形界面启动时,如果宿主机性能不好,就相当卡. 让Ubuntu 14.04默认以字符界面启动的方法: 编辑文件:etc/default/grub 将  GR ...

  8. CentOS 7 设置默认进入字符界面

    CentOS 7 设置默认进入字符界面原创阳阳唐 最后发布于2018-10-18 10:12:51 阅读数 3363 收藏展开准备修改之前安装的centos7的默认启动方式,安装时是图形用户界面,想让 ...

  9. js控制treeview默认展开

    bootStrapTreeview 在bootstrap的treeview官网,可以找到这个方法,用js控制可以写成:$('#xxx').treeview('collapseNode',{silent ...

随机推荐

  1. SSIS 系列 - 在 SSIS 中使用 Multicast Task 将数据源数据同时写入多个目标表,备份数据表,以及写入Audit 信息

    转自http://www.cnblogs.com/biwork/p/3328838.html 在 SSIS Data Flow 中有一个 Multicast 组件,它的作用和 Merge, Merge ...

  2. A Corrupt Mayor's Performance Art(线段树区间更新+位运算,颜色段种类)

    A Corrupt Mayor's Performance Art Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 100000/100 ...

  3. 蚂蚁的难题(二)首尾相连数组的最大子数组和(DP)

    蚂蚁的难题(二) 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 下雨了,下雨了,蚂蚁搬家了. 已知有n种食材需要搬走,这些食材从1到n依次排成了一个圈.小蚂蚁对每种食材 ...

  4. 9年经验,总结SEO职业瓶颈

    昨天与某集团的副总与部门总监沟通了一些关于SEO发展与瓶颈的问题,有很多感触,今天整理出来分享给大家.其实关于SEO瓶颈这个话题已经不是一年两年了,很多新人老人越来越困惑,9年历程一路风雨走来,希望能 ...

  5. 【后缀数组】【poj2774】【 Long Long Message】

    题意: 求两个串的最长连续子串. 我的想法: 枚举第二个串...在第一个串的后缀数组中二分查找. 复杂度NlogN.最坏情况N^2 题解: (3)height 数组:定义height[i]=suffi ...

  6. 项目总结之SSI (一)

    这是我进公司之后做的第一个新项目,从无到有. 去年夏天和同事在会议室里度过的日子还恍如昨日啊,时光啊,你慢些走... 作为一个外部项目,美工设计了一个Win8风格的界面,看到现在做前台的同学做的一样是 ...

  7. FineUI

    window间传值: Window1.GetSaveStateReference(new string[] { TextBox1.ClientID, ak.ClientID })收 ActiveWin ...

  8. 2014年1月9日 Oracle 内存与结构

    Oracle启动时为启动一个实例 主要为 实例 SVG 数据库文件 其它文件 1.Oracle:  内存 进程  其他文件 1.1 SVG内存(Cache)  1.1.1 共享池(Shared Poo ...

  9. DataGridView显示行号

    //可以在DataGirdView的RowPostPaint事件中进行绘制. //如:添加以下方法代码 private void DrawRowIndex(object sender, DataGri ...

  10. json 去空值与缩进

    var jSetting = new Newtonsoft.Json.JsonSerializerSettings(); //忽略值为null的 jSetting.NullValueHandling ...