Skip to content

Instantly share code, notes, and snippets.

@NeilPandya
Last active September 21, 2024 16:50
Show Gist options
  • Save NeilPandya/a0e9aea86fbff81a70fc8f533d1cd1b0 to your computer and use it in GitHub Desktop.
Save NeilPandya/a0e9aea86fbff81a70fc8f533d1cd1b0 to your computer and use it in GitHub Desktop.
x11vnc & SDDM & Kubuntu

x11vnc & SDDM & Kubuntu

SDDM with 16.04 LTS introduces two new problems that did not exist with 15.10 or 14.04:

  1. The option HideShells in /etc/sddm.conf does not work correctly. When more than one shell is specified, the filter does not work and the matching users are listed in the greeting screen notwithstanding.

  2. The xauthority (or MIT-MAGIC-COOKIE) file is no longer at /var/run/sddm/:0 but at an unpredictable location like /var/run/sddm/{ca7d6d45-9b4d-4a92-997e-c9c11081dea1} which is build by including a random UUID in the path. When trying to start x11vnc, for example, that file cannot be found. With 15.10, one could start x11vnc with /usr/bin/x11vnc -auth /var/run/sddm/:0 -display :0 -rfbauth /etc/vncpasswd -rfbport 5943 -reopen -forever, this is no longer possible.

The second bug is uncool with Ubuntu server for remote root servers.

One can put something like this into /usr/share/sddm/scripts/Xsetup:

/usr/bin/x11vnc -rfbauth /etc/vncpasswd -rfbport 5943 -reopen -forever &

Explanation: $XAUTHORITY and $DISPLAY are set with Xsetup script.

The reason being given for the unpredictable xauth name is that sddm should be able to handle multi-seat. It sets $XAUTHORITY and $DISPLAY for all dependend children, such as /usr/share/sddm/scripts/Xsetup.

In order to start x11vnc, one should include it in Xsetup instead of establishing an independent service in systemd (since x11vnc depends on the real X server, anyway, which in turn is started/controlled by sddm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment