summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2002-07-22 23:36:51 +0000
committerGeorge Lebl <jirka@src.gnome.org>2002-07-22 23:36:51 +0000
commitb89bf80982969882f9f02e02b5b6ac89a7f2dfc3 (patch)
tree134583f6caf51a281b19ccaa126dbfab8ec466dd /config
parent8a3f2bb883f22c09dcb026a8bd3098998147e9de (diff)
downloadgdm-b89bf80982969882f9f02e02b5b6ac89a7f2dfc3.tar.gz
add a hack to fix #64662. When the shell is something that we don't really
Mon Jul 22 16:45:43 2002 George Lebl <jirka@5z.com> * daemon/slave.c: add a hack to fix #64662. When the shell is something that we don't really know (we know a few shells) just start the session with bash or sh (whichever we find). * daemon/slave.c, daemon/server.c, daemon/gdm.[ch], config/PreSession, config/PostSession: Write out an fake Xservers file each time before the PreSession script so that we may use the sessreg command nicely. Also look for sessreg in the path and a few extra dirs. And use the utmp file as well. * config/Default: setup the system Xmodmap here, copied from kdm a bit. This should fix #86098, at least it does for me. * config/PreSession, daemon/slave.c: Run the PreSession script from the session pid and in the PreSession script exec sessreg. This fixes the utmp bugs as sessreg will now register the correct pid in utmp. Also move the .xsession-errors before the PreSession script and let through the stdout/stderr descriptors so that we can get errors such as sessreg failing. Also don't error out when PreSession fails if this is a failsafe session. * daemon/slave.c: the pid of the session is not cleared until the session is over. It's not a race as I previously thought and in fact it could leave processes behind maybe. * daemon/errorgui.c: make the errors display wider, recenter the window and do a bit of cleanup
Diffstat (limited to 'config')
-rwxr-xr-xconfig/:02
-rw-r--r--config/Default12
-rwxr-xr-xconfig/PostSession8
-rwxr-xr-xconfig/PreSession22
4 files changed, 36 insertions, 8 deletions
diff --git a/config/:0 b/config/:0
deleted file mode 100755
index 8e91f69a..00000000
--- a/config/:0
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-# Stuff any local display preparation stuff here (background pics etc).
diff --git a/config/Default b/config/Default
index cd8b7d76..b8739b6b 100644
--- a/config/Default
+++ b/config/Default
@@ -1,7 +1,15 @@
#!/bin/sh
+# Stolen from the debian kdm setup, aren't I sneaky
+# -George
-#Color is now handled by gdmgreeter itself
-#/usr/bin/X11/xsetroot -solid "#007777"
+PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH
+sysmodmap=/etc/X11/Xmodmap
+if command -v xmodmap > /dev/null 2>&1; then
+ if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+ fi
+fi
+exit 0
diff --git a/config/PostSession b/config/PostSession
index 1fc261cb..c2937309 100755
--- a/config/PostSession
+++ b/config/PostSession
@@ -1,4 +1,8 @@
#!/bin/sh
-if [ -x /usr/bin/X11/sessreg ]; then
- /usr/bin/X11/sessreg -d -w /var/log/wtmp -u none -l $DISPLAY $USER
+
+PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH
+
+if command -v sessreg > /dev/null 2>&1; then
+ sessreg -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER
fi
+exit 0
diff --git a/config/PreSession b/config/PreSession
index c0db3c5e..ef820bd1 100755
--- a/config/PreSession
+++ b/config/PreSession
@@ -1,4 +1,22 @@
#!/bin/sh
-if [ -x /usr/bin/X11/sessreg ]; then
- /usr/bin/X11/sessreg -a -w /var/log/wtmp -u none -l $DISPLAY $USER
+#
+# Note that any setup should come before the sessreg command as
+# that must be 'exec'ed for the pid to be correct (sessreg uses the parent
+# pid)
+#
+# Note that output goes into the .xsession-errors file for easy debugging
+#
+PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH
+
+if command -v sessreg > /dev/null 2>&1; then
+ # some output for easy debugging
+ echo "$0: Registering your session with wtmp and utmp"
+ echo "$0: running: sessreg -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER"
+
+ exec sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER
+ # this is not reached
fi
+
+# some output for easy debugging
+echo "$0: could not file the sessreg utility, cannot update wtmp and utmp"
+exit 0