我在windows安装了VNC Viewer,远程链接ubunt12.04服务器,发现远程桌面只有一个终端,没有桌面。从网上查了一些资料,问题得以解决,记录如下:
修改~/.vnc/xstartup为:
# 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" &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
export DESKTOP_SESSION=Ubuntu-2d
export GDMSESSION=ubuntu-2d
export STARTUP="/usr/bin/gnome-session --session=ubuntu-2d"
$STARTUP
然后重新尝试:
zhangxu@zhangxu-OptiPlex-9010:~/.vnc$ vnc4server -kill :2 (kill后的序号根据实际情况来)
zhangxu@zhangxu-OptiPlex-9010:~/.vnc$ vnc4server
实际效果图:
Redhat Enterprise Linux 6.4配置VNC远程登录访问桌面:http://www.linuxdiyf.com/linux/13013.html
RedHat Enterprise Linux配置VNC多用户访问的方法:http://www.linuxdiyf.com/linux/13005.html
ubuntu15.04 vnc安装:http://www.linuxdiyf.com/linux/12798.html
X11VNC在Ubuntu 14.04服务器版上开启远程桌面的使用:http://www.linuxdiyf.com/linux/10447.html
Windows利用VNC远程连接Linux桌面:http://www.linuxdiyf.com/linux/7035.html