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

简介: 其实只要修改用户 .vnc目录下的xstartup配置文件即可 [root@localhost ~]# more /root/.vnc/xstartup#!/bin/sh # Uncomment the following two lines for normal desktop:# unset...

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

 

目录
打赏
0
0
0
0
95
分享
相关文章
使用MobaXterm在vim中开启多个窗口后无法向左切换
使用MobaXterm在vim中开启多个窗口后无法向左切换
Ubuntu18.04,开机默认开启数字小键盘设置方法
Ubuntu18.04中,一直有一点不舒服,就是开机后数字小键盘是默认关闭的状态,而我又有用小键盘输入密码的习惯,每次都忘记点【Num Lock】键,就很不舒服,便找来解决方法,使开机默认开启小键盘
842 0
如何自定义Win10的开机自启动软件?
如何自定义Win10的开机自启动软件?
195 0
如何自定义Win10的开机自启动软件?
ubuntu双系统把win7设置为默认启动选项
最近给朋友的电脑中安装了ubuntu系统,与之前的win7系统共存,每次开机默认启动的是ubuntu系统,现在想把默认启动选项设置为win7系统,我们一起看看怎么设置。 工具/原料 ubuntu16.04操作系统。
2698 0
Linux下的Ubuntu16.04.3如何设置默认启动后为字符界面(即命令行界面)
在字符界面(即命令行界面)输入命令:(亲测有效) 设置为字符界面的命令:sudo systemctl set-default multi-user.target 设置为图形界面的命令:sudo systemctl set-default graphical.
1200 0
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等