summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Bob Funk2022-11-18 07:12:12 +0100
committer Willy Sudiarto Raharjo2022-11-19 04:08:11 +0100
commit8e22868acfb29c9079d8ccf789bdf7043a7f11c2 (patch)
treef1406c29f5672e97bfdc3b7c5ac16d43eb01e0cb
parent0209d3c309087083a4f95159eda0be1f9dbdfe40 (diff)
downloadslackbuilds-8e22868acfb29c9079d8ccf789bdf7043a7f11c2.tar.gz
desktop/gdm: Add wrapper script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--desktop/gdm/README17
-rw-r--r--desktop/gdm/doinst.sh15
-rw-r--r--desktop/gdm/gdm.SlackBuild9
-rw-r--r--desktop/gdm/gdm.wrap11
4 files changed, 33 insertions, 19 deletions
diff --git a/desktop/gdm/README b/desktop/gdm/README
index ad7f01b10d..cbfa39afba 100644
--- a/desktop/gdm/README
+++ b/desktop/gdm/README
@@ -1,23 +1,6 @@
GDM is a system service that is responsible for providing graphical
logins and managing local and remote display.
-Critical note on Slackware:
-Slackware has it's '/etc/rc.d/rc.4' script starting gdm with an invalid
-command line option, which will cause gdm to fail starting in runlevel
-4. To use gdm, you will need to edit '/etc/rc.d/rc.4' to remove the
-'-nodaemon' option from being passed to gdm. After editing, the gdm
-lines should look like this:
-
-if [ -x /usr/bin/gdm ]; then
- exec /usr/bin/gdm
-fi
-
-# Someone thought that gdm looked prettier in /usr/sbin,
-# so look there, too:
-if [ -x /usr/sbin/gdm ]; then
- exec /usr/sbin/gdm
-fi
-
A note on PAM:
The GDM source includes PAM configs for linux distros like redhat, lfs,
and arch. However, none of these pre-designed configs are suitable for
diff --git a/desktop/gdm/doinst.sh b/desktop/gdm/doinst.sh
index b49d6a4e65..f0d59236c1 100644
--- a/desktop/gdm/doinst.sh
+++ b/desktop/gdm/doinst.sh
@@ -1,5 +1,18 @@
-# Set the wayland-session script executable:
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config etc/gdm/custom.conf.new
+
+# Set the wayland-session script and gdm wrapper executable:
( cd etc/gdm ; chmod 0755 wayland-session )
+( cd usr/sbin ; chmod 0755 gdm )
if [ -e usr/share/glib-2.0/schemas ]; then
if [ -x /usr/bin/glib-compile-schemas ]; then
diff --git a/desktop/gdm/gdm.SlackBuild b/desktop/gdm/gdm.SlackBuild
index aa5221034a..bb955aeea1 100644
--- a/desktop/gdm/gdm.SlackBuild
+++ b/desktop/gdm/gdm.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gdm
VERSION=${VERSION:-42.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -120,6 +120,13 @@ cat $CWD/gdm-password.pam > $PKG/etc/pam.d/gdm-password
cat $CWD/gdm-launch-environment.pam > $PKG/etc/pam.d/gdm-launch-environment
cat $CWD/wayland-session > $PKG/etc/gdm/wayland-session
+# Install GDM wrapper script:
+mv $PKG/usr/sbin/{gdm,gdm-bin}
+cat $CWD/gdm.wrap > $PKG/usr/sbin/gdm
+
+# Handle /etc/gdm/custom.conf a little nicer:
+mv $PKG/etc/gdm/{custom.conf,custom.conf.new}
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING HACKING MAINTAINERS NEWS README.md \
diff --git a/desktop/gdm/gdm.wrap b/desktop/gdm/gdm.wrap
new file mode 100644
index 0000000000..48aca9381b
--- /dev/null
+++ b/desktop/gdm/gdm.wrap
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# GDM Wrapper Script
+#
+# Slackware starts GDM with "/usr/sbin/gdm -nodaemon", which is invalid and
+# crashes GDM and runlevel 4. Since its not being fixed, lets sanitize that
+# ourselves with a wrapper script.
+
+sanitized_opts="$(echo $@ | sed 's/-nodaemon//g')"
+exec /usr/sbin/gdm-bin "$sanitized_opts"
+