Skip to content

Instantly share code, notes, and snippets.

@dattasaurabh82
Created May 16, 2022 04:19
Show Gist options
  • Save dattasaurabh82/9d5402adebf47f7e94e8601a2361bc86 to your computer and use it in GitHub Desktop.
Save dattasaurabh82/9d5402adebf47f7e94e8601a2361bc86 to your computer and use it in GitHub Desktop.
x11vnc server setup on Ubuntu

Install x11 vnc server

sudo apt-get update -y
sudo apt-get install x11vnc net-tools -y
sudo apt-get install lightdm -y

Make default Desktop as Xorg rather than Wayland

As x11vnc uses DISPLAY created by Xorg

sudo nano /etc/gdm3/custom.conf
# un-comment the line: WaylandEnable=false
sudo mkdir /usr/share/wayland-sessions/hidden
sudo dpkg-divert --rename \
  --divert /usr/share/wayland-sessions/hidden/ubuntu.desktop \
  --add /usr/share/wayland-sessions/ubuntu.desktop

Test

/usr/bin/x11vnc -xkb -noxrecord -noxfixes -noxdamage -ncache 10 -forever -rfbport 11226 -auth /run/user/1000/gdm/Xauthority -display :1

Automate at start up:

  1. Open Startup Application
  2. Add a new entry.
  3. Add the above command.
  4. Restart and Check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment