summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-14 12:43:49 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-14 12:43:49 +0100
commitc7aea42cadfe17c919ef8eedb9c1d7a9e5c4481e (patch)
tree2f603ee69b75742b90d58d76aa61d101702055f0 /bin
parentb7ecb040ae58d837e50b3c082c1b7c64dc71bf6c (diff)
downloaditzks-systems-c7aea42cadfe17c919ef8eedb9c1d7a9e5c4481e.tar.gz
itzks-systems-c7aea42cadfe17c919ef8eedb9c1d7a9e5c4481e.tar.bz2
itzks-systems-c7aea42cadfe17c919ef8eedb9c1d7a9e5c4481e.zip
gsettings for ITZkS: Prep MATE screensaver defaults, longer idle delay, introduce lock delay, introduce logout button in screensaver dialog.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/itzks-user-suicide43
1 files changed, 43 insertions, 0 deletions
diff --git a/bin/itzks-user-suicide b/bin/itzks-user-suicide
new file mode 100755
index 0000000..82e2633
--- /dev/null
+++ b/bin/itzks-user-suicide
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+# Copyright (C) 2017 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+# Copyright (C) 2017 Benjamin Schlüter <bschlueter@posteo.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+if [ $EUID -ge 500 ]; then
+
+ # safety net for well-known browsers
+ pkill -TERM -u "${LOGNAME}" x-www-browser
+ pkill -TERM -u "${LOGNAME}" firefox-esr
+ pkill -TERM -u "${LOGNAME}" firefox
+ pkill -TERM -u "${LOGNAME}" iceweasel
+ pkill -TERM -u "${LOGNAME}" chromium
+ pkill -TERM -u "${LOGNAME}" chrome
+ pkill -TERM -u "${LOGNAME}" konqueror
+ pkill -TERM -u "${LOGNAME}" midori
+ pkill -TERM -u "${LOGNAME}" opera
+ sleep 1
+
+ # dump all other processes the hard way...
+ pkill -KILL -u "${LOGNAME}"
+
+else
+
+ echo "$(basename $0): System accounts are not allowed to commit suicide."
+
+fi
+
+exit 0