From 3dcfce627f87e0e8a0f75284fb0c24779ad0491e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 14 Nov 2017 12:37:12 +0100 Subject: [lightdm-greeter-bwlp] Support autologin via demo session --- .../data/etc/lightdm/lightdm.conf.d/10-openslx.conf | 8 ++++++++ .../data/etc/lightdm/qt-lightdm-greeter.conf | 2 ++ .../data/opt/openslx/lightdm/guest-account | 5 +++++ .../data/opt/openslx/lightdm/guest-session | 18 ++++++++++++++++++ .../data/opt/openslx/lightdm/is-autologin-enabled | 5 +++++ 5 files changed, 38 insertions(+) create mode 100755 core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-account create mode 100755 core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session create mode 100755 core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/is-autologin-enabled (limited to 'core/modules/lightdm-greeter-bwlp') diff --git a/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf b/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf index 039a0400..8fbb9e25 100644 --- a/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf +++ b/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf @@ -1,7 +1,15 @@ [SeatDefaults] greeter-hide-users=true greeter-session=qt-lightdm-greeter + +greeter-allow-guest=true +allow-guest=true +guest-wrapper=/opt/openslx/lightdm/guest-session + session-wrapper=/etc/X11/Xsession display-setup-script=/etc/X11/Xsetup session-cleanup-script=/etc/X11/Xreset +[LightDM] +guest-account-script=/opt/openslx/lightdm/guest-account + diff --git a/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/qt-lightdm-greeter.conf b/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/qt-lightdm-greeter.conf index 4ed7a1a9..58f03d27 100644 --- a/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/qt-lightdm-greeter.conf +++ b/core/modules/lightdm-greeter-bwlp/data/etc/lightdm/qt-lightdm-greeter.conf @@ -19,3 +19,5 @@ greeter-banner-image=/opt/openslx/lightdm/bwlp-banner.svg greeter-bottom-left-logo-path=/etc/branding.svg greeter-background-gradient=ffffff ffffff 888687 f9a72b greeter-message-file=/run/hw-warnings.log +auto-login-check-cmd=/opt/openslx/lightdm/is-autologin-enabled + diff --git a/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-account b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-account new file mode 100755 index 00000000..30a23f24 --- /dev/null +++ b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-account @@ -0,0 +1,5 @@ +#!/bin/ash +# Run as root, intended to setup the guest account +# and echo its name at the end. +# we use the existing demo user, so not much to do +echo "demo" diff --git a/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session new file mode 100755 index 00000000..eb3205aa --- /dev/null +++ b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session @@ -0,0 +1,18 @@ +#!/bin/ash + +. /opt/openslx/config + +GUESTDIR="/opt/openslx/lightdm/autologin.d" +if [ -d "$GUESTDIR" ]; then + for file in $GUESTDIR/*; do + if [ -s "$file" ]; then + . "$file" || slxlog "xsession-autologin" "Could not source $file" "$file" + fi + done +fi + + +# Normal session mode +exec "$@" +exit 0 + diff --git a/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/is-autologin-enabled b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/is-autologin-enabled new file mode 100755 index 00000000..92b223a1 --- /dev/null +++ b/core/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/is-autologin-enabled @@ -0,0 +1,5 @@ +#!/bin/ash + +. /opt/openslx/config + +[ -n "$SLX_AUTOLOGIN" ] -- cgit v1.2.3-55-g7522