Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GuiguiWeb
Screens
Commits
c9401c18
Commit
c9401c18
authored
Oct 08, 2020
by
Grégor JOUET
🔧
Browse files
Update
parent
a6118a55
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
roles/install_screen/tasks/disable_sleepmode.yml
roles/install_screen/tasks/disable_sleepmode.yml
+1
-0
roles/install_screen/tasks/main.yml
roles/install_screen/tasks/main.yml
+16
-1
roles/install_screen/tasks/open_browser.yml
roles/install_screen/tasks/open_browser.yml
+3
-0
roles/install_screen/tasks/reset_idle.yml
roles/install_screen/tasks/reset_idle.yml
+6
-2
roles/install_screen/tasks/rotate_display.yml
roles/install_screen/tasks/rotate_display.yml
+6
-0
No files found.
roles/install_screen/tasks/disable_sleepmode.yml
View file @
c9401c18
...
...
@@ -9,6 +9,7 @@
-
name
:
Persist sleep mode stop
register
:
persist
become
:
true
tags
:
sleep
copy
:
dest
:
/etc/profile.d/sleepmode.sh
mode
:
'
0774'
...
...
roles/install_screen/tasks/main.yml
View file @
c9401c18
---
-
name
:
Setting new hostname
hostname
:
name={{ inventory_hostname }}
become
:
yes
tags
:
hostname
-
name
:
Update /etc/hosts with hostname
become
:
yes
tags
:
hostname
lineinfile
:
path
:
/etc/hosts
regexp
:
"
127[.]0[.]0[.]1.*"
line
:
"
127.0.0.1
localhost.localdomain
localhost
{{
inventory_hostname
}}"
state
:
present
-
include
:
disable_sleepmode.yml
-
include
:
rotate_display.yml
-
include
:
open_browser.yml
\ No newline at end of file
-
include
:
open_browser.yml
-
include
:
reset_idle.yml
\ No newline at end of file
roles/install_screen/tasks/open_browser.yml
View file @
c9401c18
---
-
name
:
Create dir
tags
:
browser
file
:
path
:
/home/pi/.config/lxsession/LXDE-pi
state
:
directory
...
...
@@ -7,6 +8,7 @@
-
name
:
Open dvic website on boot
register
:
appened
tags
:
browser
copy
:
dest
:
/home/pi/.config/lxsession/LXDE-pi/autostart
mode
:
'
0660'
...
...
@@ -14,6 +16,7 @@
@chromium-browser --kiosk dvic.devinci.fr
-
name
:
Restart
tags
:
browser
reboot
:
when
:
appened is changed
become
:
true
roles/install_screen/tasks/reset_idle.yml
View file @
c9401c18
---
-
name
:
Install xprintidle
become
:
true
tags
:
idle
apt
:
name
:
xprintidle
update_cache
s
:
true
update_cache
:
true
state
:
present
-
name
:
Install reset script
become
:
true
tags
:
idle
copy
:
dest
:
/usr/local/bin/reset_screen.sh
mode
:
'
0775'
content
:
|
#!/bin/bash
idle=`DISLAY=:0 xprintidle`
idle=`DIS
P
LAY=:0 xprintidle`
if [ $idle -ge 600000 ] && [ $idle -le 1200000 ]; then
pkill chromium-browser
DISPLAY=:0 chromium-browser --kiosk dvic.devinci.fr &
...
...
@@ -21,9 +23,11 @@
-
name
:
Set crontab for idle checking
become
:
true
tags
:
idle
cron
:
name
:
"
check
idle
time"
job
:
/usr/local/bin/reset_screen.sh
minute
:
"
*/10"
user
:
pi
\ No newline at end of file
roles/install_screen/tasks/rotate_display.yml
View file @
c9401c18
---
-
name
:
Get default system target
tags
:
rotate
become
:
true
shell
:
systemctl get-default
register
:
default_target
-
name
:
Set default target to graphical
tags
:
rotate
shell
:
systemctl set-default graphical.target
when
:
default_target.stdout != "graphical.target"
become
:
true
-
name
:
Remove display border
tags
:
rotate
lineinfile
:
path
:
/boot/config.txt
line
:
"
disable_overscan=1"
...
...
@@ -26,12 +29,14 @@
-
name
:
Install xinput-calibrator
become
:
true
tags
:
rotate
apt
:
name
:
xinput-calibrator
state
:
present
-
name
:
Persist rotation and calibration
register
:
persist
tags
:
rotate
become
:
true
copy
:
dest
:
/etc/profile.d/screen.sh
...
...
@@ -42,6 +47,7 @@
DISPLAY=:0 xinput set-prop 6 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
-
name
:
Restart
tags
:
rotate
reboot
:
when
:
(display_rotate is changed) or (persist is changed)
become
:
true
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment