From 09ddb17aa000807350273729f3418a8fa3c85533 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 13 Apr 2023 02:07:58 +0200 Subject: [PATCH] update.. --- roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml | 2 +- roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml | 2 +- .../lib/systemd/system/x11vnc-gdm3.service-ALT.j2 | 11 +++++++++++ .../lib/systemd/system/x11vnc-gdm3.service.j2 | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 roles/common/templates/lib/systemd/system/x11vnc-gdm3.service-ALT.j2 diff --git a/roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml b/roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml index 0c939ea..93b66ec 100644 --- a/roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml +++ b/roles/common/tasks/ubuntu-x11vnc-1804-amd64.yml @@ -49,7 +49,7 @@ - name: "(ubuntu-x11vnc-1804-amd64.yml) Transfer x11vnc.service.j2 to /lib/systemd/system/x11vnc.service" template: - src: lib/systemd/system/x11vnc-gdm3.service.j2 + src: lib/systemd/system/x11vnc-gdm3.service-ALT.j2 dest: /lib/systemd/system/x11vnc.service - name: "(ubuntu-x11vnc-1804-amd64.yml) Enable service" diff --git a/roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml b/roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml index 8d97abf..bcdc239 100644 --- a/roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml +++ b/roles/common/tasks/ubuntu-x11vnc-2004-amd64.yml @@ -52,7 +52,7 @@ - name: "(ubuntu-x11vnc-2004-amd64.yml) Transfer x11vnc.service.j2 to /lib/systemd/system/x11vnc.service" template: - src: lib/systemd/system/x11vnc-gdm3.service.j2 + src: lib/systemd/system/x11vnc-gdm3.service-ALT.j2 dest: /lib/systemd/system/x11vnc.service - name: "(ubuntu-x11vnc-2004-amd64.yml) Enable service" diff --git a/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service-ALT.j2 b/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service-ALT.j2 new file mode 100644 index 0000000..c271560 --- /dev/null +++ b/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service-ALT.j2 @@ -0,0 +1,11 @@ +# {{ ansible_managed }} +[Unit] +Description=Start x11vnc at startup. +After=multi-user.target + +[Service] +Type=simple +ExecStart=/usr/bin/x11vnc -loop -forever -bg -rfbport 5900 -xkb -noxrecord -noxfixes -noxdamage -shared -norc -auth /run/user/{{ grp_id_gdm.stdout }}/gdm/Xauthority -rfbauth /etc/x11vnc.pass + +[Install] +WantedBy=multi-user.target diff --git a/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service.j2 b/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service.j2 index c271560..74bc8b1 100644 --- a/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service.j2 +++ b/roles/common/templates/lib/systemd/system/x11vnc-gdm3.service.j2 @@ -4,6 +4,7 @@ Description=Start x11vnc at startup. After=multi-user.target [Service] +User=gdm Type=simple ExecStart=/usr/bin/x11vnc -loop -forever -bg -rfbport 5900 -xkb -noxrecord -noxfixes -noxdamage -shared -norc -auth /run/user/{{ grp_id_gdm.stdout }}/gdm/Xauthority -rfbauth /etc/x11vnc.pass