add x11vnc service
This commit is contained in:
parent
698950d346
commit
3c0ee18e97
2 changed files with 23 additions and 0 deletions
|
@ -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
|
||||||
|
|
10
x11vnc.service
Normal file
10
x11vnc.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=x11vnc
|
||||||
|
After=graphical.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/x11vnc -forever -shared -display :0 -rfbport 5900
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Reference in a new issue