Bug#289378: GDM: 2.6.0.6-1 doesn't load user startup files on login

Dimitri Puzin Dimitri Puzin <tristan-777@ddkom-online.de>, 289378@bugs.debian.org
Thu, 24 Mar 2005 17:59:30 +0100


Package: gdm
Version: 2.6.0.6-1

Hello,
I've found that the .xsession scripts in $HOME are not processed when 
the user logs in. Since find utility now supports the --list argument, 
I'd suggest to rip out the workaround of /etc/gdm/Xsession (similar to 
/etc/X11/Xsession) as follows

--- Xsession.orig	2005-03-23 20:53:45.000000000 +0100
+++ Xsession	2005-03-24 16:23:09.000000000 +0100
@@ -70,23 +70,6 @@
             "<debian-x@lists.debian.org>."
  }

-run_parts () {
-  # until run-parts --noexec is implemented
-  if [ -z "$1" ]; then
-    internal_errormsg "run_parts() called without an argument."
-  fi
-  if [ ! -d "$1" ]; then
-    internal_errormsg "run_parts() called, but \"$1\" does not exist or 
is" \
-                      "not a directory."
-  fi
-  for F in $(ls $1); do
-    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
-      if [ -f "$1/$F" ]; then
-        echo "$1/$F"
-      fi
-    fi
-  done
-}
  # initialize variables for use by all session scripts

  OPTIONFILE=/etc/X11/Xsession.options
@@ -201,7 +184,7 @@
  # instead of executing so that the variables and functions defined above
  # are available to the scripts, and so that they can pass variables to 
each
  # other
-SESSIONFILES=$(run_parts $SYSSESSIONDIR)
+SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
  if [ -n "$SESSIONFILES" ]; then
    for SESSIONFILE in $SESSIONFILES; do
      . $SESSIONFILE

This would close bug #289378 at least partially and allow users to run 
their .xsession on login through GDM. The .xclients method seems to be 
not supported at all. If it's important, I'd suggest to direct the rest 
of the bug to xfree86-common maintainers to implement appropiate scripts 
under /etc/X11/Xsession.d/ for loading .xclients file on startup. 
Otherwise, with the patch above it works (at least for 3 boxes here) and 
the bug can be closed.

Kind regards,
-Dimitri