Configure vncserver on Mint

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 15:25, 15 February 2018 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A VNC server is a program that shares a desktop with other computers over a network. Vino is the default VNC server in Mint Linux. x11vnc is another VNC server that uses tcl/tk based GUI and is not dependent on any one particular graphical environment.

The default VNC Server only lets you connect remotely once the user has logged into Cinnamon. This is not useful for a remote headless system. To configure the VNC Server to start with the system and listen before a user is logged in locally the vncserver must be configured to start with the system services. For this it is the most simple to install x11vnc. In this guide we will configure vncserver as a boot service.

If you reboot the system you can still get in as this will allow vnc server to share the login screen. Screen resolution adjustment after login may cause the connection to reset, however, you can reconnect and you're in like Flynn.

Vino is crap, we'll remove it, install x11vnc and set a default password, which is the password client will use to connect.

sudo apt-get -y remove vino
sudo apt install x11vnc
sudo mkdir /etc/x11vnc
sudo x11vnc --storepasswd /etc/x11vnc/vncpwd

Now to make x11vnc server start as a system service

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

Now you're in the text editor and you need to add the following lines:

[Unit]
Description=Start x11vnc at startup.
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -noxdamage -repeat -rfbauth /etc/x11vnc/vncpwd -rfbport 5900 -shared

[Install]
WantedBy=multi-user.target

Save and exit vi, go back to command prompt and type:

sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service
sudo systemctl start x11vnc.service
  • verified: Mint 18.3 Sylvia 2/15/2018