VNC Server for elementary OS
This site is under construction.

version: 2.1.0

C Новым Годом!

mode: 

VNC Server for elementary OS

How to configure remote desktop on elementary OS

elementary.svg

Unfortunately there is not a built-in or pre-installed remote desktop service on elementary OS. So we are going to make it through our own way.

So If you need to remote access to X-session there is a way to do it by permanently running daemon or by manually running command.

Let's get started:


Step 1 - Install X11VNC

sudo apt-get install x11vnc -y


Step 2 - Set a password to access the computer

sudo x11vnc -storepasswd /etc/x11vnc.pass


Step 2.5 Manually running VNC server

If we want it to work only on command, then this command must be run after each reboot of the PC in order to up the x11vnc server:

/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared

but if we want to start service automatically do the next:


Step 3 - Create configuration file

Create a file (you will also need administrator rights), specify your port (if necessary) to edit files, I use the nano editor

sudo nano /lib/systemd/system/x11vnc.service
[Unit]

Description=Start x11vnc at startup.

After=multi-user.target

[Service]

Type=simple

ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared

[Install]

WantedBy=multi-user.target


Step 4 - Service setup

sudo systemctl enable x11vnc.service
sudo systemctl daemon-reload
sudo systemctl start x11vnc.service


Step 5 - Reboot system and check it out

sudo shutdown -r now

You can connect by any vnc clients by specifying the connection address and port. After that, if the client connects, it will ask you for the password you set and show the screen if the password is correct.