On Fri, 11 Aug 2000, Bill Freeman wrote:

>       So Paul is correct.  If $HOME/.xinitrc doesn't exist then
> /etc/X11/xinit/xinitrc, if it exists, is used (and, similarly if
> $HOME/.xserverrc doesn't exist then /etc/X11/xinit/xserverrc, if
> it exists, is used).

I'm sorry but it seems you've misread something... Paul said that xinit
looks for .xinitrc or .xsession -- IT DOES NOT.  It checks for .xinitrc
but does not look at .xsession at all.  Only sessions started through a
login manager ( [xgk]dm ) look at your .xsession file.

I appologize for being pedantic but I can't help myself... ;) It's true
that the startx shell script will look for a few other files, but
.xsession is not one of them.  Also, Paul was describing the behavior of
xinit when he was describing which client files get sourced (though he did
indeed specify that xinit was called from startx). The xinit program
itself does not check /etc/X11/xinit/xinitrc at all, and this file is only
consulted when xinit is run from startx specifically with that file as an
argument.  If you run xinit yourself, that file is not checked.

This might be an important distinction, because while startx is generally
the standard way to start X from a console session, I'm nearly positive
I've seen (old, granted) documentation telling one to use xinit to start
an X session.  If that is done, you will not get the behavior you
describe, and a newbie will find himself puzzled as to why.  Back to
windows for that guy.  :)

And let's not forget, the question was asked by someone who was unfamiliar
with how the X startup process works, so if we're going to answer his
question, we owe it to him to get it right.

Cheers


> Derek Martin writes:
> > Today, Paul Lussier gleaned this insight:
> ...
> > > > And while I'm asking, how does the "startx" command know which to
> > > >start ?  I looked and didn't see anything.
> > > 
> > > 'startx' runs xinit, which looks for a file in the user's homedir
> > > called either .xinit or .xsession.  This file contains commands to be
> > > exec'ed at "log in time".  There's also a default Xinit file somewhere
> > > which it will fall back to if it doesn't find anything in the user's
> > > homedir.
> > 
> > This is almost true, but not quite.  When starting X with startx, .xinitrc
> > is the only file looked for (actually you can specify a startup script on
> > the command line if you like).  From the xinit(1) man page:
> > 
> >        If no specific client program  is  given  on  the  command
> >        line, xinit will look for a file in the user's home direc�
> >        tory called .xinitrc to run as a shell script to start  up
> >        client  programs.   If no such file exists, xinit will use
> >        the following as a default:
> > 
> >             xterm  -geometry  +1+1  -n  login  -display  :0
> > 

-- 
Derek Martin
System Administrator
Mission Critical Linux
[EMAIL PROTECTED] 


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to