install desktop
apt update
apt install --no-install-recommends ubuntu-desktop nano
install vnc server
apt install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
apt install dbus-x11
apt install tightvncserver
init and set password
mkdir ~/.Xresources
export USER=root
vncserver :0
list and kill
ps uax | grep vnc
vncserver -kill :0
config vnc server
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
nano ~/.vnc/xstartup
#!/bin/bash
export $(dbus-launch)
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"
export XDG_MENU_PREFIX="gnome-flashback-"
xrdb $HOME/.Xresources
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
chmod +x ~/.vnc/xstartup
set password
vncpasswd :0
start
export USER=root
vncserver :0
access
vnc://ip:5900