[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re:kde/gnome/blackbox



Martin Theiß wrote:
> Prakash Countcham wrote:
> > > logo:~# update-alternatives --list x-session-manager
> > > /usr/bin/icewm-session
> > > /usr/bin/gnome-session
> > > /usr/bin/xfce4-session
> >
> > This is interesting. I was just trying to make fwvm as default on
> > my box. But update-alternatives doesn't work with fvwm :( (It
> > isn't considered as a x-session-manager, only a x-window-manager).
> >
> > While reading the rest of the thread, I was also wondering which
> > of .xinitrc and .xsession is better according to Debian policy.

They serve to do similar things from different starting points.
Rather like asking do I take the highway North or the expressway East?
It all depends upon from where you are starting.

> Don't know what policy thinks about this, but from my own experience:
> .xinitrc is used when you use a plain startx or similar to start your
> xserver and related things.

More precisely .xinitrc is used by the 'xinit' program.  That
connection should be clear.  Once upon a time (still common today)
users would log into a text console and start X with 'xinit'.  The
'xinit' program would read ~/.xinitrc for startup commands.  In that
script you would start your window manager and possibly other things.

That is good for the user who has a .xinitrc file.  But what about
those that don't have one?  In that case xinit uses a very basic
default and starts up on xterm.  In the case of a new user this is
very stark.  There is no window manager or anything else running.

Systems wishing to make this better for the user with no files offer
'startx'.  This is simply a script which looks to see if the user has
a .xinitrc file and launches xinit if they do.  But if the user does
not have customized files then startx falls back to using system
provided startup files and starts xinit with the system files instead.
This can provide a nicer interface as a default for users without any
customization at all.  When there are no user customization files is
the configuration when 'startx' makes things nice.  It is a simple
pass through to xinit when there are user customization files.

This is a simplified description of events.

> .xsession should be executed by your session manager (gdm, kdm, xdm) after
> the user has logged in.

Yes!  That is it.  The graphical login manager runs the ~/.xsession
if it exists and falls back to a system default if it does not.  This
is more similar in functionality to startx because it will use bigger,
hopefully reasonable, system defaults if no user customization exists.

> I'm not quite sure where there is a relationship between both, maybe one
> uses another as a fall back. For more info about this I advice you to read
> the docs of gdm, kdm, xdm .. whatever.

'xinit' is a simple direct engine to start X.  'xinit' uses .xinitrc
to customize it.  'startx' is a script wrapper to make running that
engine run more friendly by providing system defaults.  'xdm' (and
kdm, and gdm) is the next generation and combines previous
functionality and uses .xsession or system defaults to customize it.

Logging in on the text console and starting X:
  If I have no files I use 'startx' to get system defaults.  If I have
  custom files I use 'xinit' because 'startx' no longer buys me
  anything.  Although many people always use startx regardless.  This
  route uses the optional ~/.xinitrc file.

Logging in on the graphics console with X already running:
  This route uses the optional ~/.xsession file.

Two different routes from different starting places to the same ending
destination.

Bob

Attachment: pgpo2zut7BdJl.pgp
Description: PGP signature


Reply to: