:: Re: [DNG] How to change default ses…
Góra strony
Delete this message
Reply to this message
Autor: Irrwahn
Data:  
Dla: dng
Temat: Re: [DNG] How to change default session
On Tue, 24 May 2016 17:28:44 +0200, Emninger wrote:
[...]
> I changed the cmd_login line in slim to be sure it loads correctly all
> i want. If i execute the standard login_cmd without cycling thru the
> sessions options, no desktop is started at (but i want charge you to
> try something with slim - i saw your request ;).


Leading me onto thin ice, eh? ;-D Oh well, I bite! :P

> BUT: Just to learn something what would be the difference
> between .xinitrc and .xsessionrc?
>
> In the standard login command (for linux)
> login_cmd           exec /bin/bash -login /etc/X11/Xsession %session
> %session is referred to what? The session chosen (by F1)?


You are referring to /etc/slim.conf here. And yes, I assume(!)
%session gets substituted with your selection from the F1 menu.

> And, do i read correctly /etc/X11/Xsession, that it automatically
> integrates ~/.Xresources and ~/.xsessionrc ? So, there will be no need
> to merge .Xresources in .xsessionrc ... (?) - differently from .xinitrc
> which starts X without using /etc/X11/Xsession.


I think pages like e.g. http://unix.stackexchange.com/questions/281858/
explain it better than I can, but I'll have a go at it anyway:

Your ~/.xinitrc is executed by xinit when you use startx to bring
up the X server. It is only used for that purpose, and ignored
when starting X via a login manager. In fact, you can launch
a session manager from within .xinitrc. Note: if there is no .xinitrc,
in Debian startx invokes the default Xsession scripts, effectively
doing the same as a graphical login would do, including sourcing
.xsessionrc (see below). (On my desktop I do not have .initrc, but
have .Xresources and .xsessionrc. No matter if I use startx or
lightdm, I basically get the same X environment.)

Your ~/.xsessionrc is sourced by the script
/etc/X11/Xsession.d/40x11-common_xsessionrc
(using the $USERXSESSIONRC variable set in /etc/X11/Xsession).

Your ~/.Xresources is sourced by the script
/etc/X11/Xsession.d/30x11-common_xresources
(using the $USRRESOURCES variable set in /etc/X11/Xsession).

So, yes, your analysis is dead on. Matter of fact, you don't need
*any* of .xinit, .Xresources or .xsessionrc, *unless* you need to
perform some fancy extra configuration/initialization (like for
the X server kill hotkey, etc.). IOW: You can boot into X with
an completely empty home directory!

Note 1: .xsessionrc is a "debianism", not necessarily present in
other distributions.

Note 2: There are even more hooks into the X startup sequence, as
explained in the article linked above.

> Thanks a lot in advance for our patience!


Again, you're welcome. I even learned a bit myself over the course
of the past few days, so ... yeah. :)

Regards
Urban