[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#168347: system default x-session-manager/xwindow-manager (patch)



Package: xfree86-common
Version: 4.2.1-3
Severity: wishlist
Tags: patch

File:  /etc/X11/Xsession.d/50xfree86-common_determine-startup

Issues:
 1) Full path was not given for REALSTARTUP (Just to be safe side)
 2) If x-session-manager is installed on the system, it gets quite
    intrusive to make one of the x-window-manager as the system default
    (I like blackbox but want to have some accounts with KDE or GNOME.)
 3) If alternative system is broken (as I did recently), fall-back
    scenario is weak.  (Let's fall-back to twm or xterm to make people
    aware there is life beyond GNOME and KDE. Both xterm and twm are in
    your associated packages).
 4) Hello, Branden.  I am brave enough to write a section for quick 
    start-up guide for X in my "Debian Reference".  Windows manager
    set-up was one of the challenging one and I want my life to be easy
    :-)  (I still have to add/correct few things in there.  This is
    solicitation of constructive flame.) Latest CVS build are:
    
      http://qref.sf.net/Debian/reference/ch-tune.en.html#s-x

Please consider replacing 50xfree86-common_determine-startup with
something like attached file and update /etc/X11/Xsession.options
accordingly as attached file.  (Oops, I do not have manual page)

-- 
~\^o^/~~~ ~\^.^/~~~ ~\^*^/~~~ ~\^_^/~~~ ~\^+^/~~~ ~\^:^/~~~ ~\^v^/~~~ +++++
        Osamu Aoki <osamu@debian.org>   Cupertino CA USA, GPG-key: A8061F32
 .''`.  Debian Reference: post-installation user's guide for non-developers
 : :' : http://qref.sf.net and http://people.debian.org/~osamu
 `. `'  "Our Priorities are Our Users and Free Software" --- Social Contract

if grep -qs ^allow-user-xsession "$OPTIONFILE"; then
  for STARTUPFILE in "$STARTUP" "$ALTSTARTUP"; do
    if [ -e "$STARTUPFILE" ]; then
      if [ -x "$STARTUPFILE" ]; then
        REALSTARTUP=$STARTUPFILE
      else
        REALSTARTUP="sh $STARTUPFILE"
      fi
      break
    fi
  done
fi

# Works even if alternative system is broken. :-)
# also now you can install X session manager and you can choose to
# use X window manager as default for everyone.
if [ -z "$REALSTARTUP" ]; then
  if [ -x /usr/bin/x-session-manager ]; then
    if ! grep -qs ^do-not-use-x-session-manager "$OPTIONFILE"; then
      REALSTARTUP=/usr/bin/x-session-manager
    fi
  elif [ -x /usr/bin/x-window-manager ]; then
    if ! grep -qs ^do-not-use-x-window-manager "$OPTIONFILE"; then
      REALSTARTUP=/usr/bin/x-window-manager
    fi
  elif [ -x /usr/bin/X11/twm ]; then
    if ! grep -qs ^do-not-use-x-window-manager "$OPTIONFILE"; then
      REALSTARTUP=/usr/bin/X11/twm
    fi
  elif [ -x /usr/bin/x-terminal-emulator ]; then
    REALSTARTUP=/usr/bin/x-terminal-emulator
  elif [ -x /usr/bin/X11/xterm ]; then
    REALSTARTUP=/usr/bin/X11/xterm
  fi
fi

if [ -z "$REALSTARTUP" ]; then
  # fatal error
  ERRMSG="Xsession: unable to start X session; "
  if grep -qs ^allow-user-xsession "$OPTIONFILE"; then
    ERRMSG="$ERRMSG no $STARTUP file, no $ALTSTARTUP file,"
  fi
  errormsg "$ERRMSG no session managers, no window managers, and no terminal" \
           "emulators found.  Aborting."
fi
# /etc/X11/Xsession.options
#
# configuration options for /etc/X11/Xsession
# See Xsession.options(5) for an explanation of the available options.
# Default enabled
allow-failsafe
allow-user-resources
allow-user-xsession
use-ssh-agent
# Default disabled (enable them by uncommenting)
#do-not-use-x-session-manager
#do-not-use-x-window-manager

Reply to: