VNC

VNC Viewer为什么连接后,不能显示桌面,而只有一个Terminal窗口

作者: surron   发布时间: 2011-05-11

你安装的是 vnc4server ?
修改  ~/.vnc/xstartup

添加 # 号注释掉 x-window-manager & 这一行,然后添加一行
gnome-session &

修改好以后的配置文件如下:

#!/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 &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
gnome-session &



切换到 root
chmod 755  /etc/X11/xinit/xinitrc

作者: yhzm1314   发布时间: 2011-05-12