tags 838876 patch
thanks



On Mon 26 Sep 2016 at 00:05:09 +0100, Brian Potkin wrote:

> Section 7.5.2. makes it clear that ~/.xsession or ~/.Xsession customise
> the startup of X for a user. This fits well with what is is said in
> startx(1) and Xsession(5). A ~/.xsession is the client which controls
> the starting and stopping of X. This is referred to as the classic file
> to use to customise an X session and to completely override the system
> code.
> 
> In section 7.5.3. it is said that ~/.xsessionrc is a new method to
> customise the X session without completely overriding the system code.
> 
> It is the second section I am concerned with. In the first place it
> gives the impression that ~/.xsessionrc does something different from
> ~/.xsession but does not specify what. In the second place the official
> documentation on ~/.xsessionrc is severely lacking. The best it can do
> is in Xsession(5):
> 
>  > This allows the user to set global environment variables
>  > for their X session, such as locale information
> 
> Indeed it can, but global environment variables are just as happy being
> in ~/.xsession. It isn't mentioned in Xsession(5) that X programs and
> scripts can be run from ~/.xsessionrc but people do that to completely
> override the system code. The same programs and scripts will run from
> ~/.xsession. Is it not the case that whatever can be put in ~/.xsession
> can also be put in ~/.xsessionrc?
> 
> So what is the purpose of ~/.xsessionrc? Why does it exist? What does it
> do better than ~/.xsession?
> 
> A ~/.xsession must contain a command for a process which does not
> complete (e.g. 'exec fvwm'). If it doesn't it is not possible to put
> environment variables (or anything else there) there to be acted on by
> 50x11-common_determine-startup. This was the thrust of the report in
> #411639 and the reason ~/.xsessionrc was introduced. (Why 'exec
> gnome-session' or a similar line could not be put in ~/.xsession as a
> solution is beyond me).
> 
> The purpose of ~/.xsessionrc deserves an entry in debian-reference but
> not under a heading of "Customizing the X session (new method)" and with
> rather more detailed treatment than it gets elsewhere.

Here are some suggested changes:


7.5.2. Customizing the X session (classic method)

On a system where "/etc/X11/Xsession.options" contains a line
"allow-user-xsession" without preceding "#" characters, any user who
defines "~/.xsession" or "~/.Xsession" is able to customize the action
of "/etc/X11/Xsession" by completely overriding the system code. The
file can be used to set environment variables and start programs.

The last command in the "~/.xsession" file must start a process which
does not terminate. It would usually have the form "exec
some-window/session-manager" to start your favorite X window/session
manager.

The contents of a "~/.xsession" are acted on irrespective of the
display (or login) manager (DM), session manager or window manager (WM)
used.

7.5.3. Customizing the X session (DM  and session manager dependent method)

Here are alternative methods to customize the X session without
completely overriding the system code as above.

 * The display manager gdm3 can select a specific session and set it as
   the argument of "/etc/X11/Xsession".

 * The "~/.gnomerc" file is executed as a part of start up process.
   (GNOME desktop only but DM independent).

 * When logging in with gdm3 the files "/etc/xprofile" and "~/.xprofile"
   are read. (WM and session manager independent).

[[    The GUI program based session management software may use the
"~/.gnome2/session" file etc.

GNOME 2 last appeared in Squeeze. Delete? ]]

7.5.4. Customizing the X session (DM, WM and session manager independent method)

 * A "~/.xsessionrc" file can be sourced as a part of the start up
   process. The file can be used to set environment variables and start
   programs, all of which must terminate. The intention of the file is to
   allow the non-terminating program (session manager or WM) to be
   determined by x-session-manager or x-window-manager.

   Note that the existence and use of "~/.xsessionrc" allows a user to
   circumvent any restrictions set by an administrator in
   "/etc/X11/Xsession.options".

Regards,

Brian.

Reply via email to