Compare commits
6 commits
64ccfcb88b
...
48302bf947
Author | SHA1 | Date | |
---|---|---|---|
48302bf947 | |||
13fe7d490d | |||
85c1491b92 | |||
097dcfefc4 | |||
f2ee180967 | |||
0e20540107 |
7 changed files with 123 additions and 38 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules
|
11
disable-input.service
Normal file
11
disable-input.service
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Disable Keyboard and Mouse Input
|
||||
After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sleep 60
|
||||
ExecStart=%h/disable_input.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
8
disable_input.sh
Executable file
8
disable_input.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
echo "Disabling input devices"
|
||||
for id in $(xinput --list | grep -Eo 'id=[0-9]+' | cut -d= -f2); do
|
||||
xinput --disable "$id"
|
||||
echo "Disabled device ID $id"
|
||||
done
|
||||
|
||||
echo "All devices disabled."
|
|
@ -4,7 +4,8 @@
|
|||
.subject,
|
||||
.atlaskit-portal-container,
|
||||
.atlaskit-portal,
|
||||
#notifications-container {
|
||||
#notifications-container,
|
||||
.stage-participant-label {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
|
12
parsifal-player.service
Normal file
12
parsifal-player.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Parsifal Player
|
||||
After=lightdm.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/bin/sh -c 'for i in {1..10}; do xset q && break || sleep 2; done'
|
||||
ExecStart=/usr/bin/mpv --fs --no-osc --loop-file=inf %h/main.mov
|
||||
Restart=always
|
||||
Environment=DISPLAY=:0
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -57,48 +57,32 @@
|
|||
owner: "{{ ansible_user }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Symlink parsifal.service to systemd user directory
|
||||
- name: Symlink all service files
|
||||
file:
|
||||
src: "/home/{{ ansible_user }}/parsifal/parsifal.service"
|
||||
dest: "/home/{{ ansible_user }}/.config/systemd/user/parsifal.service"
|
||||
src: "/home/{{ ansible_user }}/parsifal/{{ item }}"
|
||||
dest: "/home/{{ ansible_user }}/.config/systemd/user/{{ item }}"
|
||||
state: link
|
||||
loop:
|
||||
- parsifal.service
|
||||
- unclutter.service
|
||||
- x11vnc.service
|
||||
|
||||
- name: Symlink unclutter.service to systemd user directory
|
||||
file:
|
||||
src: "/home/{{ ansible_user }}/parsifal/unclutter.service"
|
||||
dest: "/home/{{ ansible_user }}/.config/systemd/user/unclutter.service"
|
||||
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
|
||||
command: systemctl --user daemon-reload
|
||||
- name: Reload systemd user service
|
||||
become: yes
|
||||
become_user: "{{ ansible_user }}"
|
||||
environment:
|
||||
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
scope: user
|
||||
|
||||
- name: Enable and start the Parsifal service
|
||||
command: systemctl --user enable --now parsifal
|
||||
- name: Enable and start all services
|
||||
become: yes
|
||||
become_user: "{{ ansible_user }}"
|
||||
environment:
|
||||
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user
|
||||
|
||||
- name: Enable and start the Unclutter service
|
||||
command: systemctl --user enable --now unclutter
|
||||
become: yes
|
||||
become_user: "{{ ansible_user }}"
|
||||
environment:
|
||||
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
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
enabled: yes
|
||||
state: started
|
||||
scope: user
|
||||
loop:
|
||||
- parsifal
|
||||
- unclutter
|
||||
- x11vnc
|
||||
|
|
68
setup-player.yml
Normal file
68
setup-player.yml
Normal file
|
@ -0,0 +1,68 @@
|
|||
---
|
||||
- hosts: players
|
||||
become: yes
|
||||
|
||||
tasks:
|
||||
- name: Install mpv, unclutter
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
loop:
|
||||
- mpv
|
||||
- unclutter
|
||||
|
||||
- name: Copy disable-input script
|
||||
copy:
|
||||
src: disable_input.sh
|
||||
dest: "/home/{{ ansible_user }}/disable_input.sh"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Ensure systemd user directory exists
|
||||
file:
|
||||
path: "/home/{{ ansible_user }}/.config/systemd/user"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Copy all service files
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/home/{{ ansible_user }}/.config/systemd/user/{{ item }}"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: "0644"
|
||||
loop:
|
||||
- parsifal-player.service
|
||||
- disable-input.service
|
||||
- unclutter.service
|
||||
|
||||
- name: Reload systemd user service
|
||||
become: yes
|
||||
become_user: "{{ ansible_user }}"
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
scope: user
|
||||
|
||||
- name: Enable input disable service
|
||||
become: yes
|
||||
become_user: "{{ ansible_user }}"
|
||||
systemd:
|
||||
name: disable-input
|
||||
enabled: yes
|
||||
scope: user
|
||||
|
||||
- name: Enable and start all services
|
||||
become: yes
|
||||
become_user: "{{ ansible_user }}"
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
enabled: yes
|
||||
state: started
|
||||
scope: user
|
||||
loop:
|
||||
- parsifal-player
|
||||
- unclutter
|
Loading…
Reference in a new issue