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
> 
> [Ignorant indeed!  Grrr...]
> 
> 
> Man pages are your friend!  :)

        Would but this last statement were still true.  These days
even if you can figure out whether to look at a man page, and info
page, or some other help document, it's becomming increasingly
probable that the document is incomplete, or misleading, like the one
Derek quotes.  Instead, source code is your friend.  And you don't
even have to install source code to get source code when dealing with
a shell script like startx.  From /usr/X11R6/bin/startx on my RH6
laptop:

-----------------------------------------------------------------------
userclientrc=$HOME/.xinitrc
userserverrc=$HOME/.xserverrc
sysclientrc=/etc/X11/xinit/xinitrc
sysserverrc=/etc/X11/xinit/xserverrc
clientargs=""
serverargs=""

if [ -f $userclientrc ]; then
    clientargs=$userclientrc
else if [ -f $sysclientrc ]; then
    clientargs=$sysclientrc
fi
fi

if [ -f $userserverrc ]; then
    serverargs=$userserverrc
else if [ -f $sysserverrc ]; then
    serverargs=$sysserverrc
fi
fi
-----------------------------------------------------------------------

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

                                                        Bill


**********************************************************
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