aboutsummaryrefslogtreecommitdiff
path: root/arctica-greeter-guest-session-auto.sh
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-11-28 16:46:35 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-11-28 17:05:32 +0100
commitacd892c44dea80442d8e704bc6cb19ed74bd48e9 (patch)
treed86935c529987e0bc05e9be4ee108070daec4475 /arctica-greeter-guest-session-auto.sh
parent4fe6467e0d16374cf92624337f4e7c363506dd59 (diff)
downloadarctica-greeter-acd892c44dea80442d8e704bc6cb19ed74bd48e9.tar.gz
arctica-greeter-acd892c44dea80442d8e704bc6cb19ed74bd48e9.tar.bz2
arctica-greeter-acd892c44dea80442d8e704bc6cb19ed74bd48e9.zip
Rename various scripts, so that they have 'arctica-greeter' in their file name (and not just 'arctica').
Diffstat (limited to 'arctica-greeter-guest-session-auto.sh')
-rwxr-xr-xarctica-greeter-guest-session-auto.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/arctica-greeter-guest-session-auto.sh b/arctica-greeter-guest-session-auto.sh
new file mode 100755
index 0000000..785b077
--- /dev/null
+++ b/arctica-greeter-guest-session-auto.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 Canonical Ltd
+# Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+#
+# 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, version 3 of the License.
+#
+# See http://www.gnu.org/copyleft/gpl.html the full text of the license.
+
+# This script is run via autostart at the launch of a guest session.
+
+. gettext.sh
+
+export TEXTDOMAINDIR=/usr/share/locale
+export TEXTDOMAIN=arctica-greeter
+
+DIALOG_SLEEP=${DIALOG_SLEEP:-4}
+
+# disable screen locking (GNOME, Unity)
+gsettings set org.gnome.desktop.lockdown disable-lock-screen true
+
+# disable screen locking (MATE)
+gsettings set org.mate.screensaver lock-enabled false
+
+# disable screenlocking (XFCE, Pantheon)
+gsettings set apps.light-locker light-locker-enabled false
+gsettings set apps.light-locker late-locking false
+gsettings set apps.light-locker lock-on-lid false
+gsettings set apps.light-locker lock-on-suspend false
+
+# info dialog about the temporary nature of a guest session
+dialog_content () {
+ TITLE=$(eval_gettext 'Temporary Guest Session')
+ TEXT=$(eval_gettext 'All data created during this guest session will be deleted
+when you log out, and settings will be reset to defaults.
+Please save files on some external device, for instance a
+USB stick, if you would like to access them again later.')
+ para2=$(eval_gettext 'Another alternative is to save files in the
+/var/guest-data folder.')
+ test -w /var/guest-data && TEXT="$TEXT\n\n$para2"
+}
+test -f "$HOME"/.skip-guest-warning-dialog || {
+ if [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
+ dialog_content
+ TEXT_FILE="$HOME"/.guest-session-kdialog
+ echo -n "$TEXT" > $TEXT_FILE
+ {
+ # Sleep to wait for the the info dialog to start.
+ # This way the window will likely become focused.
+ sleep $DIALOG_SLEEP
+ kdialog --title "$TITLE" --textbox $TEXT_FILE 450 250
+ rm -f $TEXT_FILE
+ } &
+ elif [ -x /usr/bin/zenity ]; then
+ dialog_content
+ {
+ # Sleep to wait for the the info dialog to start.
+ # This way the window will likely become focused.
+ sleep $DIALOG_SLEEP
+ zenity --warning --no-wrap --title="$TITLE" --text="$TEXT"
+ } &
+ fi
+}
+
+# run possible local startup commands
+test -f /etc/guest-session/auto.sh && . /etc/guest-session/auto.sh