VNC (Virtual Network Computing) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol to remotely control another computer. With x11vnc software in Linux Mint you can remotely access your computer hosting an X Window session, from your local network or even from the Internet.

Setting up VNC Server (x11vnc) in Linux Mint 18.x

1- Begin by removing the default Vino server (desktop sharing) in Linux Mint:

sudo apt-get -y remove --purge vino

Uninstall Vino Server

2- With Vino server removed, it is time to install x11vnc:

sudo apt-get -y install x11vnc

3- Next, let’s create a directory to store a file that will contain the password used for VNC authentication:

sudo mkdir /etc/x11vnc

4- And… well, create an encrypted password file and save it in /etc/x11vnc/. You will be prompted to type and verify the password:

sudo x11vnc --storepasswd /etc/x11vnc/vncpwd

VNC Server encrypted password file

5- Now we will create the systemd service file for the x11vnc service:

sudo xed /lib/systemd/system/x11vnc.service

Copy & paste the code below into xed:

[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=display-manager.service

[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -dontdisconnect -auth guess -forever -shared -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd -rfbport 5900 -bg -o /var/log/x11vnc.log
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
Restart-sec=5

[Install]
WantedBy=multi-user.target

For more details on x11vnc configuration options (settings) read on x11vnc manual:
~ $ man x11vnc

x11vnc.service

Save and close the file. Then copy /lib/systemd/system/x11vnc.service to /etc/systemd/system/

sudo cp /lib/systemd/system/x11vnc.service /etc/systemd/system/

6- Next, let’s edit /lib/systemd/system/graphical.target

sudo xed /lib/systemd/system/graphical.target

Edit graphical.target file as following:

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Graphical Interface
Documentation=man:systemd.special(7)
Requires=multi-user.target
Wants=display-manager.service x11vnc.service
Conflicts=rescue.service rescue.target
After=multi-user.target rescue.service rescue.target display-manager.service
AllowIsolate=yes

graphical.target

Save and close the file. Then copy /lib/systemd/system/graphical.target to /etc/systemd/system/

sudo cp /lib/systemd/system/graphical.target /etc/systemd/system/

7- Reload services and enable the x11vnc service at boot time:

sudo systemctl daemon-reload
sudo systemctl enable graphical.target

Finally, either reboot (preferably) Linux Mint or manually start x11vnc service:

sudo systemctl start x11vnc.service

Remotely controlling Linux Mint 18.x

From a client computer in your network, using a VNC client of your choice (Remmina, Ultra VNC, TightVNC, Chicken VNC, VNC Viewer, Screen Sharing, (you name it) enter the IP address of your Linux Mint box or its hostname (if there is local DNS resolution available in your network) and enjoy your hard work :)

Remmina VNC Connection

Remmina Desktop Client

VNC Viewer

VNC Viewer Mint Box

Screen Sharing OSX

Screen Sharing Linux Mint

Related Post

Dropbox fix for Linux Mint 18.x Xfce I came across this Dropbox bug in Linux Mint 18.2 Sonya Xfce where it simply refuses to show up the correct icon in my system tray or to give me any m...
DNS Security with dnscrypt-proxy for your home net... DNSCrypt to the rescue! DNS is one of the fundamental building blocks of the Internet. It’s used any time you visit a website, send an email, have an ...
Linux Mint on Macbook White 4,1 (late 2007) Touchp... If you installed Linux Mint 17.2 Rafaela in a Macbook White 4,1 or booted it up from a live DVD or USB stick, you will immediately notice that the...