On Mon, Feb 20, 2017 at 04:02:50PM +0100, Vincent Lefevre wrote:
> More precisely, if I understand correctly,
> 
> 1. The DM can request some window manager (for instance, the user has
>    the choice between several ones, and he may also choose the default
>    session file, or whatever has been used last). If a choice has been
>    done, then /etc/X11/Xsession.d/20x11-common_process-args will define
>    $STARTUP based on this choice.
> 
> 2. If there wasn't a specific request, then when
>    /etc/X11/Xsession.d/50x11-common_determine-startup is sourced,
>    $STARTUP is still empty. In this case, $STARTUP is defined there
>    in the following way.
> 
> 2a. If /etc/X11/Xsession.options contains allow-user-xsession (which
>     isn't the default, AFAIK), then $STARTUP is set to the user
>     session file, normally "$HOME/.xsession", as /etc/X11/Xsession
>     contains: USERXSESSION=$HOME/.xsession
>     The window manager should be started from this script.
> 
> 2b. Otherwise, the following executables are tried in succession:
>       /usr/bin/x-session-manager
>       /usr/bin/x-window-manager
>       /usr/bin/x-terminal-emulator

I believe this is what I documented on https://wiki.debian.org/Xsession
If the wiki doesn't reflect your understanding of the scripts, then it's
possible that one of misread them, and we can work on getting the wiki
into a more accurate (or more clear) state.

I also used the Debian reference manual, linked from that page, and
"man Xsession", while trying to figure out how this stuff works.  I did
not go through the extra steps of installing and removing various display
managers and desktop environments in order to reverse engineer them.
My dedication to this cause has limitations.

> Note: since window managers can also start X clients on start up,
> a .xsession file may not be useful for everyone.

It's a crazy mixed-up world.

Reply via email to