ubuntu 16.04 安装VNC远程桌面

1、安装
$sudo apt-get install xfce4 
$sudo apt-get install vnc4server
$sudo apt-get install xrdp   

2、启动VNC

sudo vncserver

第一次启动需要设置密码


3、修改配置文件

sudo vi ~/.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 &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
xfce4-session & 

4、从新启动vncserver 与 xrdp

sudo vncserver -kill :1 
sudo vncserver
sudo service xrdp restart     


你可能感兴趣的:(linux)