VNC

Remotely control Linux Mint 18.x – VNC Server (x11vnc) Setup

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.

[wp_ad_camp_5]

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

[wp_ad_camp_5]

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

[wp_ad_camp_3]

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

Fixing Subsonic intermittent playing after 5.2.1 r... I've been a Subsonic Media Streamer Premium user for years. Since Subsonic just works I've been lazy enough not to keep up with updates until recently...
More ♥ for Software Sources and Update Manager in ... Software Sources and Update Manager in Linux Mint 17.3 Rosa get some extra love! I mentioned before that users didn't use other Linux Mint mirrors mai...
Make DuckDuckGo Chrome’s default search engi... So, you want to deploy the search engine that doesn't track you as the default search engine for your users. Here is a quick How-To make DuckDuckGo Ch...

3 thoughts on “Remotely control Linux Mint 18.x – VNC Server (x11vnc) Setup

  1. Отлично, на 18.3 XFCE первое найденное работающее решение которое не ломает lightDM, а предыдущий комментарий по поводу шифрования, прежде чем выполнять инструкцию в dconf-editor (http://ask.xmodulo.com/enable-configure-desktop-sharing-linux-mint-cinnamon-desktop.html ) отключить надо require-encryption (disable)

  2. I am using Linux Mint 17.3 and have successfully followed all steps down to #7 [including substituting “nano” for “xed” where required]. I am a Linux novice and as “systemctl” command is not available in this release [nor as a download], how do I perform the actions required in step #7? However, I note that “systemd” is available [not yet installed] but what would the step #7 commands be if I were to use that [if it’s possible!]. Thanks.

Leave a Reply