Fixes and improvements for power/logout handling.
This commit is contained in:
parent
f7eba29ba4
commit
51cb0a2804
2 changed files with 13 additions and 2 deletions
|
@ -30,7 +30,7 @@ if ! t=$(talk2dbus qdbus org.kde.screensaver /ScreenSaver GetActiveTime) ; then
|
||||||
echo "No graphical logins found."
|
echo "No graphical logins found."
|
||||||
else
|
else
|
||||||
idle=$(( t / 1000 ))
|
idle=$(( t / 1000 ))
|
||||||
if [[ $idle -gt $maxidle ]] ; then
|
if [[ $idle -gt $maxidle ]] && [[ ! -d "/srv/samba/schools/default-school/teachers/" ]] ; then
|
||||||
talk2dbus notify-send -i system-shutdown -u critical -a 'Important System Information' \
|
talk2dbus notify-send -i system-shutdown -u critical -a 'Important System Information' \
|
||||||
'Please log out, the system will shut down soon!' \
|
'Please log out, the system will shut down soon!' \
|
||||||
'There has been no activity for too long.'
|
'There has been no activity for too long.'
|
||||||
|
|
|
@ -108,16 +108,27 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
|
||||||
- name: Restrict some user actions
|
- name: Configure some KDE aspects
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/xdg/kdeglobals
|
path: /etc/xdg/kdeglobals
|
||||||
create: true
|
create: true
|
||||||
block: |
|
block: |
|
||||||
|
[KDE]
|
||||||
|
SingleClick=false
|
||||||
|
|
||||||
[KDE Action Restrictions][$i]
|
[KDE Action Restrictions][$i]
|
||||||
action/start_new_session=false
|
action/start_new_session=false
|
||||||
#action/switch_user=false
|
#action/switch_user=false
|
||||||
#action/lock_screen=false
|
#action/lock_screen=false
|
||||||
|
|
||||||
|
- name: Shut down when idle for too long
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /etc/xdg/powermanagementprofilesrc
|
||||||
|
content: |
|
||||||
|
[AC][SuspendSession][$i]
|
||||||
|
idleTime=36000000
|
||||||
|
suspendType=8
|
||||||
|
|
||||||
#- name: Disable automatic lock screen and user specific modifications
|
#- name: Disable automatic lock screen and user specific modifications
|
||||||
# ansible.builtin.copy:
|
# ansible.builtin.copy:
|
||||||
# path: /etc/xdg/kscreenlockerrc
|
# path: /etc/xdg/kscreenlockerrc
|
||||||
|
|
Loading…
Add table
Reference in a new issue