[ADD] Shows desktop every few minutes

This commit is contained in:
Jorge Enrique Gómez Gómez 2022-07-12 14:18:22 -05:00
parent 574941cde5
commit 1a3374d1e2
7 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=Show desktop for a few seconds
[Service]
Type=oneshot
Environment=DISPLAY=:0.0
Environment=XAUTHORITY=/home/odoo/.Xauthority
ExecStart=/usr/bin/nitrogen --set-zoom-fill --random /home/odoo/wallpapers/
ExecStart=sh -c "xdotool key Super_L+d; sleep 7; xdotool key Super_L+d"
User=odoo
Group=users

View File

@ -0,0 +1,10 @@
[Unit]
Description=Show desktop every few minutes
[Timer]
OnCalendar=*:0/5
Persistent=true
[Install]
WantedBy=timers.target

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

View File

@ -20,3 +20,5 @@
- import_tasks: allow_remote_page_refresh.yml
- import_tasks: show_desktop_periodically.yml

View File

@ -0,0 +1,29 @@
---
- name: Copy wallpapers
copy:
src: wallpapers/
dest: /home/odoo/wallpapers/
owner: odoo
- name: Service that schedules the desktop to show every few minutes
copy:
src: show_desktop_timer_unit
dest: /etc/systemd/system/show-desktop.timer
mode: 0644
owner: root
- name: Script that reloads the screen when it detects the file changed
copy:
src: show_desktop_service_unit
dest: /etc/systemd/system/show-desktop.service
mode: 0644
owner: root
- name: Enable and start the scheduled desktop show
systemd:
daemon_reload: yes
name: show-desktop.timer
state: started
enabled: true

View File

@ -7,6 +7,7 @@ required_packages:
- xinit
- xdotool
- openbox
- nitrogen
- chromium-browser
kiosk_url: 'https://erp.agofer.com/web#action=1013&model=stock.delivery&view_type=kanban&cids=1&menu_id=736'