X Strike Force SVN commit: rev 361 - in trunk/debian: . local/Xsession.d
Author: branden
Date: 2003-08-05 00:16:18 -0500 (Tue, 05 Aug 2003)
New Revision: 361
Modified:
trunk/debian/changelog
trunk/debian/local/Xsession.d/50xfree86-common_determine-startup
Log:
debian/local/Xsession.d/50xfree86-common_determine-startup: fix another
logic error (sigh), only attempt to futz with the user's .[Xx]session if
we don't already know what to do; add comments explaining fallback
process since there are apparently about 100 ways to do this simple thing
wrongly
Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog 2003-08-05 05:03:18 UTC (rev 360)
+++ trunk/debian/changelog 2003-08-05 05:16:18 UTC (rev 361)
@@ -91,8 +91,10 @@
specific program is handed to the /etc/X11/Xsession script where that
program would get ignored in favor of a user's $HOME/.[Xx]session file;
while I was at it, fixed a lot of confusing variable names that led to
- this logic error in the first place (based on a patch by Frank Murphy --
- thanks!) (Closes: #195845)
+ this logic error in the first place, and add some explanatory comments to
+ the elaborate fallback procedure, though this duplicates the content of
+ Xsession(5) (based on a patch by Frank Murphy -- thanks!)
+ (Closes: #195845)
-- Branden Robinson <branden@debian.org> Mon, 4 Aug 2003 23:57:03 -0500
Modified: trunk/debian/local/Xsession.d/50xfree86-common_determine-startup
==============================================================================
--- trunk/debian/local/Xsession.d/50xfree86-common_determine-startup 2003-08-05 05:03:18 UTC (rev 360)
+++ trunk/debian/local/Xsession.d/50xfree86-common_determine-startup 2003-08-05 05:16:18 UTC (rev 361)
@@ -1,18 +1,26 @@
# $Id$
-if grep -qs ^allow-user-xsession "$OPTIONFILE"; then
- for STARTUPFILE in "$USERXSESSION" "$ALTUSERXSESSION"; do
- if [ -e "$STARTUPFILE" ]; then
- if [ -x "$STARTUPFILE" ]; then
- STARTUP="$STARTUPFILE"
- else
- STARTUP="sh $STARTUPFILE"
+# If no X session startup program was passed to the Xsession script as an
+# argument (e.g., by the display manager), or if that program was not
+# executable, fall back to looking for a user's custom X session script, if
+# allowed by the options file.
+if [ -z "$STARTUP" ]; then
+ if grep -qs ^allow-user-xsession "$OPTIONFILE"; then
+ for STARTUPFILE in "$USERXSESSION" "$ALTUSERXSESSION"; do
+ if [ -e "$STARTUPFILE" ]; then
+ if [ -x "$STARTUPFILE" ]; then
+ STARTUP="$STARTUPFILE"
+ else
+ STARTUP="sh $STARTUPFILE"
+ fi
+ break
fi
- break
- fi
- done
+ done
+ fi
fi
+# If there is still nothing to use for a startup program, try the system
+# default session manager, window manager, and terminal emulator.
if [ -z "$STARTUP" ]; then
if [ -x /usr/bin/x-session-manager ]; then
STARTUP=x-session-manager
@@ -23,8 +31,8 @@
fi
fi
+# If we still have not found a startup program, give up.
if [ -z "$STARTUP" ]; then
- # fatal error
ERRMSG="unable to start X session ---"
if grep -qs ^allow-user-xsession "$OPTIONFILE"; then
ERRMSG="$ERRMSG no \"$USERXSESSION\" file, no \"$ALTUSERXSESSION\" file,"
Reply to: