VNC is a graphical desktop sharing system that allows remote access to a computer. To set up VNC on an Ubuntu 16.04 server, follow these steps:
Update and Upgrade Packages:
Install Required Packages:
- For a full desktop environment, install:
apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
- For essential packages only, use:
apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
Disable NetworkManager:
Install VNC Server:
Initialize VNC Server:
- Start the VNC server and set a password (up to 8 characters):
vncserver :1
- You will see a message indicating the creation of configuration files and a default startup script.
Stop VNC Server:
- To adjust configuration files, stop the VNC server:
vncserver -kill :1
Edit VNC Startup Configuration:
Restart VNC Server:
- Start the VNC server again:
vncserver :1
Configure Automatic Startup:
Once you’ve saved the crontab changes, VNC setup is complete. You can access your VNC server using a VNC client at server_ip:5901
(e.g., 123.456.789.0:5901
) with the password you set during initialization.