diff --git a/roles/lmn_fvs/files/pwroff b/roles/lmn_fvs/files/pwroff index 56b9d22..f95d5b7 100755 --- a/roles/lmn_fvs/files/pwroff +++ b/roles/lmn_fvs/files/pwroff @@ -30,7 +30,7 @@ if ! t=$(talk2dbus qdbus org.kde.screensaver /ScreenSaver GetActiveTime) ; then echo "No graphical logins found." else 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' \ 'Please log out, the system will shut down soon!' \ 'There has been no activity for too long.' diff --git a/roles/lmn_fvs/tasks/main.yml b/roles/lmn_fvs/tasks/main.yml index 5a1fd9c..e1c7102 100644 --- a/roles/lmn_fvs/tasks/main.yml +++ b/roles/lmn_fvs/tasks/main.yml @@ -108,16 +108,27 @@ mode: 0644 -- name: Restrict some user actions +- name: Configure some KDE aspects blockinfile: path: /etc/xdg/kdeglobals create: true block: | + [KDE] + SingleClick=false + [KDE Action Restrictions][$i] action/start_new_session=false #action/switch_user=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 # ansible.builtin.copy: # path: /etc/xdg/kscreenlockerrc