summaryrefslogtreecommitdiffstats
path: root/core/modules/lightdm-greeter-bwlp
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-14 12:37:12 +0100
committerSimon Rettberg2017-11-14 12:37:12 +0100
commit3dcfce627f87e0e8a0f75284fb0c24779ad0491e (patch)
tree986b90c3adb4f0e82a7cea2df6c84d5122dc6ed7 /core/modules/lightdm-greeter-bwlp
parent[slxbrowser] Honor SLX_BROWSER_INSECURE config option (diff)
downloadmltk-3dcfce627f87e0e8a0f75284fb0c24779ad0491e.tar.gz
mltk-3dcfce627f87e0e8a0f75284fb0c24779ad0491e.tar.xz
mltk-3dcfce627f87e0e8a0f75284fb0c24779ad0491e.zip
[lightdm-greeter-bwlp] Support autologin via demo session
Diffstat (limited to 'core/modules/lightdm-greeter-bwlp')
-rw-r--r--core/modules/lightdm-greeter-bwlp/data/etc/lightdm/lightdm.conf.d/10-openslx.conf8
-rw-r--r--core/modules/lightdm-greeter-bwlp/data/etc/lightdm/qt-lightdm-greeter.conf2
-rwxr-xr-xcore/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-account5
-rwxr-xr-xcore/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/guest-session18
-rwxr-xr-xcore/modules/lightdm-greeter-bwlp/data/opt/openslx/lightdm/is-autologin-enabled5
5 files changed, 38 insertions, 0 deletions
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" ]