3 # Copyright (C) 2013 Canonical Ltd
4 # Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
6 # This program is free software: you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free Software
8 # Foundation, version 3 of the License.
10 # See http://www.gnu.org/copyleft/gpl.html the full text of the license.
12 # This script is run via autostart at the launch of a guest session.
14 export TEXTDOMAINDIR=/usr/share/locale-langpack
15 export TEXTDOMAIN=lightdm
17 # disable screen locking (GNOME, Unity)
18 gsettings set org.gnome.desktop.lockdown disable-lock-screen true
20 # disable screen locking (MATE)
21 gsettings set org.mate.screensaver lock-enabled false
23 # disable screenlocking (XFCE, Pantheon)
24 gsettings set apps.light-locker light-locker-enabled false
25 gsettings set apps.light-locker late-locking false
26 gsettings set apps.light-locker lock-on-lid false
27 gsettings set apps.light-locker lock-on-suspend false
29 # info dialog about the temporary nature of a guest session
31 TITLE=$(gettext 'Temporary Guest Session')
32 TEXT=$(gettext 'All data created during this guest session will be deleted
33 when you log out, and settings will be reset to defaults.
34 Please save files on some external device, for instance a
35 USB stick, if you would like to access them again later.')
36 para2=$(gettext 'Another alternative is to save files in the
37 /var/guest-data folder.')
38 test -w /var/guest-data && TEXT="$TEXT\n\n$para2"
40 test -f "$HOME"/.skip-guest-warning-dialog || {
41 if [ "$KDE_FULL_SESSION" = true ] && [ -x /usr/bin/kdialog ]; then
43 TEXT_FILE="$HOME"/.guest-session-kdialog
44 echo -n "$TEXT" > $TEXT_FILE
46 # Sleep to wait for the the info dialog to start.
47 # This way the window will likely become focused.
49 kdialog --title "$TITLE" --textbox $TEXT_FILE 450 250
52 elif [ -x /usr/bin/zenity ]; then
55 # Sleep to wait for the the info dialog to start.
56 # This way the window will likely become focused.
58 zenity --warning --no-wrap --title="$TITLE" --text="$TEXT"
63 # run possible local startup commands
64 test -f /etc/guest-session/auto.sh && . /etc/guest-session/auto.sh