本文摘录、整理了网上为Ubuntu系统安装、配置VNC服务程序的资料。
PS:Ubuntu实践版本 Ubuntu 16.04 LTS
更新操作系统软件包
apt-get update apt-get upgrade
安装gnome和vnc4server
apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal apt-get install vnc4server
首次启动vncserver并根据提示设置vnc密码
vncserver :1
配置 ~/.vnc/xstartup文件,配置后文件内容如下
#!/bin/sh export XKL_XMODMAP_DISABLE=1 unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS gnome-panel & gnome-settings-daemon & metacity & nautilus & gnome-terminal &
然后重新启动vncserver即可。
vncserver -kill :1 vncserver :1
设置vncserver自启动
touch /etc/init.d/vncserver chmod +x /etc/init.d/vncserver cat > /etc/init.d/vncserver << EOF #!/bin/bash ### BEGIN INIT INFO # Provides: vnc4server # Required-Start: $local_fs $network # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: VNC # Description: VNC Service ### END INIT INFO case "$1" in start) #su -c "vncserver -depth 32 -geometry 1024x768" root su -c "vncserver -geometry 1440x900" root #su -c "vncserver" root ;; stop) vncserver -kill :1 ;; *) echo $"Usage: $0 {start|stop}" exit 1 esac EOF update-rc.d vncserver defaults 99
设置vncserver自启动(未验证)
http://blog.chinaunix.net/uid-8657589-id-3457101.html
http://blog.chinaunix.net/uid-20528014-id-4714397.html
http://blog.csdn.net/alvin969/article/details/6170884
http://blog.csdn.net/jink12/article/details/23088659(已验证,1604自启动有问题)
http://blog.csdn.net/a105421548/article/details/46379049(已验证,界面背景灰色)
原文地址:http://xdwqs.blog.51cto.com/4758880/1787796