To answer your actual question
@murali asks: Does elementary os come with any native VNC server?
No, elementary OS does not come with a GUI frontend for setting up a VNC server.
Note: Most likely this is not a deliberate rejection of the functionality so much as the fact that elementary OS exclusively uses its own GUI applications built from scratch in Vala, and building a GUI frontend for setting up a VNC server is just a relatively low priority. It would be a good project for a Settings panel at some point, though.
To set up a VNC server anyway
Note: I found this as a web search result for setting up a VNC server on elementary OS. The other results on the elementary OS StackExchange are fairly old (or vague), so I'm just going to go ahead and put extremely basic (but detailed) instructions here despite the fact that you didn't directly ask for them.
We are going to use
x11vnc, which is a fairly simple, fairly generic VNC server that works well with Pantheon and supports connecting to the login screen (i.e. after startup and before logging in).
x11vnc is conveniently available from elementary OS's
apt repositories (which for elementary OS Odin are Canonical's repositories for Ubuntu 20.04 LTS Focal Fossa). It has tons and tons of options that we're just not going to use. There are other VNC servers you can use that among other things may have commercial support. Because you're here, I'm assuming you're not using one of them, so
x11vnc it is.
We are going to use the command line in order to keep things as simple as possible.
These instructions are adapted from, among other things, this tutorial, which worked for me.
- You will need
- You will need to set up OpenSSH if you haven't done so already.
Note: These instructions do not include steps for VNC authentication or allowing VNC through the firewall because it assumes you will use an SSH tunnel. This keeps things simple and also more secure.
If you haven't set up SSH, in order to do so in the very most basic way with default settings, run each of the following commands in Terminal:
$ sudo apt install openssh-server -y
$ sudo systemctl enable ssh
$ sudo systemctl start ssh
$ sudo ufw allow ssh
In Terminal (or over SSH):
$ sudo apt install x11vnc -y
systemd service (so
x11vnc runs automatically)
Open a new file in
$ sudo nano /etc/systemd/system/x11vnc.service
Paste this into the file:
Description=Start x11vnc at startup.
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbport 5900 -shared -o /var/log/x11vnc.log
Save the file by typing
Ctrl-O and exit
nano by typing
Enable and start the
$ sudo systemctl enable x11vnc
$ sudo systemctl start x11vnc
x11vnc should now be running, and it should start automatically whenever you log in locally.
To log in remotely
Note: This is assuming the client machine is on the same local network as the host machine. If you are connecting to the host machine over WAN, I'll assume you already know the public hostname or IP address.
Gather the necessary information
To get the host machine's hostname, on the host machine, run:
This should print the host machine's hostname, e.g.
If, further in the instructions, the hostname doesn't work, you can use the IP address instead. To get the host machine's IP address, on the host machine, run:
$ hostname -I
This should print all of the host machine's IP addresses, like so:
192.168.XXX.XXX [a bunch of ipv6 addresses follow]
You can probably just use the first one, i.e. the ipv4 address.
Enter the information on the client computer
On the client computer, use the following information:
- The hostname, e.g.
.local, or the IP address from above
22, i.e. SSH
- Whatever login information you use for SSH, which should by default be your local login username and password on the host computer
Example client setup: Edovia Screens
Note: My client computer is a MacBook, and I'm using Edovia Screens because Apple Screen Sharing doesn't like the authentication we're using. Because it's what I'm using to test these instructions as I write them, the following instructions use Edovia Screens as the example. If I figure out a way to use Apple Screen Sharing I'll update these instructions. If someone with edit privileges wants to add examples for other client platforms, feel free.
- In Edovia Screens, click the
+ icon in the toolbar and select
- In the first popup, click
- In the second popup, enter the information as follows:
Name is the "pretty" display name for the bookmarked host computer, e.g.
Foo Bar (i.e. you can use capitalization and spaces)
Address or Hostname is the hostname or IP address from above, e.g.
Operating System is
Authentication type is
- Click on the
Secure Connection tab and do the following:
Enable Secure Connections
- Enter your local login username and password from the remote computer (unless you are using SSH keys)
Enable Secure Connections on Local Network
Your Linux computer should now appear in the lefthand side of the main Edovia Screens window, with an illustration of Tux the penguin. (This image will be replaced with a screenshot each time you close a VNC session.)
To open a VNC connection to the host computer, double-click on the representation of it in the main Edovia Screens window.
- I haven't tested this with any clients other than Edovia Screens. My apologies that I'm only testing this on a piece of paid Mac software that costs $30.
- This is almost certainly not the best way of doing things. It's just relatively simple and relatively secure.
- EDIT: I previously wasn't sure if
x11vnc supported connecting to the login screen (i.e. after startup but before logging in), but I have since confirmed that it does!
- I haven't tested this using a host computer with multiple login (i.e. human) user accounts. If you have multiple login users on your host computer, you may have to do additional configuration.
- While you do need
sudo privileges in order to set this up, I don't know if you need
sudo privileges in order to log in remotely (i.e. on a managed host computer where some login users may not have