Package: x11-common Version: 1:7.1.0-6 Severity: minor Tags: patch
In the current setup /etc/X11/Xsession.d/50x11-common_determine-startup checks for a user Xsession file and if none are found proceeds to select a default wm/terminal. However there are times when the administrator wants to define an additional set of actions between these two events. In my case I have an additional script 49x11-common_invoke-chrooted-wm that is essentially the very same determine_startup script but looking in a 32bit chrooted environment and setting $STARTUP to a chrooted execution string if the requested wm is installed in the chroot. I propose a split off of the user Xsession file detection into 40x11-common_user-xsession. A diff -u1 is attached below. Also note the additional grep in user-xsession - it allows for a .Xsession file with everything in it commented out to be skipped instead of bringing up a blank X server. Cheers ==============BEGIN PATCH================= --- /x86-32/etc/X11/Xsession.d/40x11-common_user-xsession 1970-01-01 01:00:00.000000000 +0100 +++ /etc/X11/Xsession.d/40x11-common_user-xsession 2006-11-11 20:33:39.809132325 +0100 @@ -0,0 +1,20 @@ +# This file is sourced by Xsession(5), not executed. + +# 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 [ -r "$STARTUPFILE" ] && grep -qsv "^[[:space:]]*$\|^#" "$STARTUPFILE"; then + if [ -x "$STARTUPFILE" ]; then + STARTUP="$STARTUPFILE" + else + STARTUP="sh $STARTUPFILE" + fi + break + fi + done + fi +fi --- /x86-32/etc/X11/Xsession.d/50x11-common_determine-startup 2006-08-03 00:47:53.000000000 +0200 +++ /etc/X11/Xsession.d/50x11-common_determine-startup 2006-11-11 20:35:54.477908777 +0100 @@ -1,3 +1 @@ -# $Id: 50x11-common_determine-startup 305 2005-07-03 18:51:43Z dnusinow $ - # This file is sourced by Xsession(5), not executed. @@ -6,21 +4,5 @@ # 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 - 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. +# executable, and a user defined custom X session script is not available +# (or is disabled in the configuration), try the system default session +# manager, window manager, and terminal emulator. if [ -z "$STARTUP" ]; then @@ -44,3 +26 @@ fi - -# vim:set ai et sts=2 sw=2 tw=80: ======================END PATCH========================== -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17.7.tr6 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages x11-common depends on: ii debconf [debconf-2.0] 1.5.8 Debian configuration management sy ii debianutils 2.17.3 Miscellaneous utilities specific t ii lsb-base 3.1-19 Linux Standard Base 3.1 init scrip x11-common recommends no packages. -- debconf information excluded -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]