As , VNC is a protocol that permits sharing the desktop and is managed remotely over the web. With VNC you need to use a graphical desktop setting remotely. This straightforward article will aid you set up and configure the graphical desktop setting and VNC in your Ubuntu 16.04 server.
Earlier than You Start
Replace your system utilizing the next command.
sudo apt-get replace && sudo apt-get improve -y
Set up Ubuntu Desktop on Your Occasion
We’re going to put in the Unity desktop GUI on our Ubuntu Server, which is the default desktop setting of Ubuntu. To put in it together with just a few different packages that are required for the graphical interface to operate correctly, run the next command.
sudo apt-get set up ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
Through the set up, you is perhaps requested whether or not you need to change a system file to a brand new model. Sort y after which press enter to make use of the up to date model.
Set up and Configure a VNC Server
There are a number of VNC servers to selected from. We’re going to put in vnc4server.
sudo apt-get set up vnc4server
Now check the VNC server by beginning a session.
vncserver :1
You’ll be prompted for a password. Set any password you want. You must now have the ability to join utilizing a VNC shopper. However you’ll see a grey display as a substitute of the desktop. We have to configure VNC to launch the complete Unity desktop when it begins. To do it, first kill the VNC session.
vncserver -kill :1
Now edit the file ~/.vnc/xstartup to match the configuration given under. Begin by opening the file on an editor. Earlier than we start configuring the brand new xstartup
file, let’s again up the unique.
Word: This file will solely be created whenever you begin a VNC session for the primary time.
Now create a brand new xstartup
file with nano
or your favourite textual content editor.
nano ~/.vnc/xstartup
Now edit the tip of the file to match it with the under configuration.
#!/bin/sh
# Uncomment the next two traces for regular desktop:
# unset SESSION_MANAGER
# exec /and so forth/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /and so forth/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid gray
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
Save the file by urgent ctrl + o and exit by urgent ctrl + x after which urgent enter.
Now launch a VNC session once more.
vncserver :1
Now you can use a VNC shopper/viewer to hook up with your pc remotely and use it. The next is your tackle which it’s worthwhile to enter when connecting.
http://ip_address:1/
And the password shall be what you set earlier when first launching the VNC session.