1.更新系统 apt-get update -y apt-get upgrade -y
2. 安装gnome环境相关,sudo apt-get install ubuntu-desktopgnome-panel gnome-settings-daemon Metacity nautilus gnome-terminal
3. 安装vncserver,sudo apt-get install vnc4server
5. 启动vncserver,生成.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 ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
#gnome-session-fallback &
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
xsetroot -solid grey
vncconfig -iconic &
gnome-session &
gnome-panel &
gnome-settings-gaemon &
Metacity &
nautilus &
gnome-terminal &
7. 配置完毕后,启动vncserver
vncserver -geometry 1280x1024
启动后,记住vncserver的端口号
=========windows下进行vnc访问
1. 下载vncviewer客户端,输入Ip: 192.168.1.100:1(冒号后面的是7中生成的端口号)
2. 输入密码即可
=========Linux下进行vnc访问
@H_502_87@ 1、安装VNC客户程序:
sudoapt-getinstallvnc4-commonxvnc4viewer