Setup VNC
Introduction to setup VNC on Ubuntu 18.04.4 LTS
-
Uninstall the Default Gnome Desktop
$sudo apt remove gnome-shell $sudo apt remove gnome $sudo apt autoremove $sudo apt purge gnome $sudo apt autoclean $sudo apt clean
-
Install TigerVNC
$ sudo apt install xserver-xorg-core $ sudo apt install tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer $ sudo apt-get install gsfonts-x11 xfonts-base xfonts-75dpi xfonts-100dpi
-
Install Gnome 3 and start Gnome, configurate for start on boot
$ sudo apt install ubuntu-gnome-desktop $ sudo systemctl start gdm $ sudo systemctl enable gdm
-
Set VNC Server Password
$ vncpasswd Password: Verify: Would you like to enter a view-only password (y/n)? y Password: Verify:
-
Startup Script Settings
$ vim ~/.vnc/xstartup #!/bin/sh [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources vncconfig -iconic & dbus-launch --exit-with-session gnome-session &
-
Start VNC Server
$ vncserver -localhost no -geometry 1920x950 -depth 24
-
Connect by VNC Viewer Download the vncviewer from realvnc and follow the instructions to
-
Kill VNC Server
$ vncserver -list $ vncserver -kill :1 $ vncserver -kill :*