On Wed 28 Sep 2016 at 23:03:47 +0900, Osamu Aoki wrote:

> Hi,

Hello Osamu-san.

> On Mon, Sep 26, 2016 at 12:05:09AM +0100, Brian Potkin wrote:
> > Source: debian-reference
> > Version: 2.59
> > Severity: normal
> > 
> > 
> > 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
> 
> Maybe it's not perfect but it says:
> 
>   Here are new methods to customize the X session without 
>   completely overriding the system code as above.
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> I think this is clear enough :-)

To be pedantic ~/.xsessionrc can completely override system code
(whatever is meant by that):

xterm &
exec fvwm

The same two lines in ~/.xprofile (mentioned in the patch) or ~/.gnomerc
do the same. I'm not convinced "overriding the system code" is the best
criterion to use.

new" has also been taken by some users to mean "more modern" or "more
up-to-date", with he outcome that ~/.xsessionrc is seen as replacing
~/.xsession. (There's a link to that too).

> > 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?
> 
> Use of ~/.xsession completely overriding the system code.  These 2 works
> in similar but the same way.  Users are given choice.

The choice is between using ~/.xsession, a well-documented file
everywhere one looks, and an under-documented  ~/.xsessionrc which a
search on the web would reveal is frequently misunderstood. I had rather
hoped debian-reference would rectify this state of affairs. Apparently,
the staus quo is preferable.

> > So what is the purpose of ~/.xsessionrc? Why does it exist? What does it
> > do better than ~/.xsession?
> 
> OK ... design decision on what kind of configuration files to be
> used is not the bug topic for "debian-reference".  Please discuss it
> elsewhere.

It has been discussed and a link to the discussion provided. I have no
wish to re-live it.

Without knowing what a program, file etc is designed to do makes it
difficult to write about it with any degree of confidence. It will be
noticed that a manual page generally starts by stating the purpose of
the program being used. The sentence you quote was intended to promote
thought, not discussion.

> > 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).
> 
> I totally forgot about this bug report... Hmmmm.... I see changelog

The report specifies the design considerations and the reasons for
requesting a change. Its purpose is clear. I used it as a basis for
writing part of the submitted patch.

>  * Add support for $HOME/.xsessionrc. Closes: #411639
>     This file, if present, will get sourced during the start of your X
>     session. This allows you to set session-wide environment variables easily
>     for things like locale information. Patch adapted from one by Yves-Alexis
>     Perez. Thanks also to Holger Levsen and Osamu Aoki for advice.
>     + Adds 40x11-common_xsessionrc to /etc/X11/Xsession.d
>     + Document this in Xsession.5 manpage
>     + Add a NEWS.Debian entry about it
>     + Modifies /etc/X11/Xsession to declare the location of ~/.xsessionrc.
>       Custom versions of Xsession (like gdm's) will need an update
>  
> > 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.
> 
> "debian-reference" is "a terse user's guide with the focus on the shell
> command line" created and maintained by volumteer.  We should not dwell
> too much in this particular issues.

I might be misunderstanding what you mean it but this comes over to me
as "don't look too deeply at things"; "we state but do not explain";
"don't rock the boat"; "debian-reference follows the party line". Sorry
for that view.

The submitted patch has

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".

Say what you want about that section - it is not terse enough; it
doesn't focus on the shell command line; it is poorly expressed and
overwhelms the reader; it is confusing; it has insufficient detail; the
manual doesn't say that, so you must be wrong; it doesn't fit the ethos
of debian-reference; These are all possibilities.

The one thing that cannot be said is that it is inaccurate or incorrect.

> As I read my document, I think adding a simple pointer to Xsession(5) in
> at the last part of 7.5. before 7.5.1. may be one solution.

Maybe. That too leaves more questions unanswered than answered. If we
have Xsession(5) as the only source of information on ~/.xsessionrc it
misrepresents the reality of the role the file plays in starting X. Do
we have to settle for "better than nothing"?

Many thanks for your work.

Cheers,

Brian.

Reply via email to