add x11vnc service

This commit is contained in:
Tomáš Mládek 2024-09-18 23:15:46 +02:00
parent 698950d346
commit f9f2a739fc

View file

@ -69,6 +69,12 @@
dest: "/home/{{ ansible_user }}/.config/systemd/user/unclutter.service" dest: "/home/{{ ansible_user }}/.config/systemd/user/unclutter.service"
state: link state: link
- name: Symlink x11vnc.service to systemd user directory
file:
src: "/home/{{ ansible_user }}/parsifal/x11vnc.service"
dest: "/home/{{ ansible_user }}/.config/systemd/user/x11vnc.service"
state: link
- name: Reload systemd for the current user - name: Reload systemd for the current user
command: systemctl --user daemon-reload command: systemctl --user daemon-reload
become: yes become: yes
@ -89,3 +95,10 @@
become_user: "{{ ansible_user }}" become_user: "{{ ansible_user }}"
environment: environment:
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user
- name: Enable and start the x11vnc service
command: systemctl --user enable --now x11vnc
become: yes
become_user: "{{ ansible_user }}"
environment:
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user