VNC连接时出现灰屏鼠标变X

主要是修改配置文件,运行vim /root/.vnc/xstartup ,按如下修改即可
#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
# 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 &
x-session-manager & xfdesktop & xfce4-panel &
xfce4-menu-plugin &
xfsettingsd &
xfconfd &
xfwm4 &

修改完成后重启vnc
先停止#vncserver -kill :1 (注意kill后面要有个空格)
再启动#vncserver

你可能感兴趣的:(VNC连接时出现灰屏鼠标变X)