Install x11vnc

Go to End

-> Top

1. Note

28 May 2019: Disabling Wayland added.

18 May 2019: Page added.

-> Top

2. Intro

x11vnc enables remote access to the graphical desktop of Ubuntu server.

-> Top

3. Set router

Set the internet router to permit access to the server through ports 5900, 5901, etc.

-> Top

4. Disable Wayland

(section added, 28 May 2019)

Ubuntu-desktop uses gdm3 (Wayland) display manager. Wayland is not compatible with Xorg dispaly server used by x11vnc.

Execute to disable Wayland:

$ sudo gedit /etc/gdm3/custom.conf

Remove "#" to uncomment the following line:


Reboot the computer.

-> Top

5. Install


$ sudo apt install x11vnc
$ sudo apt install xvfb

xvfb provides a virtual X window, which is required for the -create option below.

-> Top

6. Start


$ x11vnc                    (not requiring a password to connect to port 5900)
$ x11vnc -rfbport <port number>
$ x11vnc -usepw             (requiring a password to connect)
$ x11vnc -create -usepw     (create a virtual desktop)

The default port to connect from client computers is 5900.

Specify 5901 for the <port number> if connection is to be permitted at port 5901.

Connection with or without password is possible.

Execute to set up password:

$ x11vnc -storepasswd

The password will be stored in the file ~/.vnc/passwd, i.e. home/<current user>/.vnc/passwd.

Connection is possible if there is already a graphical desktop logged on at the server. The screen movement at the server and the client computer will be synchronised. This would be good for monitoring the screen movement at the server.

If there is no graphical desktop logged on at the server, then:

  • use the "-create" option
  • connect remotely which should show a terminal window at the server
  • execute at the terminal window to bring up other software, such as:
  • $ firefox
    $ nautilus
  • or the graphical session:
  • $ gnome-session
  • click Activities to access other software.

The remote screen movement will not be seen at the server.

Ubuntu-desktop with gdm3 is used above.

x11vnc does not work well with gdm3 (Wayland) desktop. Therefore, just use gdm3 desktop.

Gnome (Wayland) desktop also does not permit the starting of backintime

-> Top

7. Stop

Press Ctrl-C to terminate the connection.

End of Page

-> Top

Back to top with progress scrollbar