On Feb 16 19:50:57, h...@stare.cz wrote:
> On Feb 16 11:49:58, erling.westen...@gmail.com wrote:
> > On Tue, Feb 16, 2016 at 09:32:05AM +0100, Stefan Sperling wrote:
> > > On Tue, Feb 16, 2016 at 09:15:58AM +0100, Jan Stary wrote:
> > > > There seems to be a difference between an X session
> > > > initialized by startx(1) and one launched by xdm(1).
> > > > 
> > > > When I start an X session via startx, the settings
> > > > specified in ~/.Xresources seem to be honoured.
> > > > A session started via xdm(1) does _not_ honour
> > > > 
> > > >         XTerm*utf8:     true
> > > >         XTerm*locale:   UTF-8
> > > > 
> > > > and every xterm I start in the running cwm(1)
> > > > with ctrl+alt+del has XTERM_LOCALE=C
> > > > 
> > > > On the other hand, an xterm I start with `xterm`
> > > > from an already running xterm has XTERM_LOCALE=cs_CZ.UTF-8
> > > > For an xdm(1) session, this is exactly the difference in env(1)
> > > > between a ctrl-alt-del started xterm and an `xterm`.
> > > > 
> > > > In a startx(1) session, the xterm started as ctrl-alt-del
> > > > already has XTERM_LOCALE=cs_CZ.UTF-8 as per ~/.Xresources
> > > > 
> > > > Is this expected? Is it due to a difference between
> > > > an xdm(1) session and a startx(1) session?
> > > > 
> > > >         Jan
> > > > 
> > > > 
> > > > $ cat ~/.xinit:
> > > > 
> > > > #!/bin/sh
> > > > 
> > > > xset -b -c dpms 300 600 900 m 2 0 r rate 400 30 s blank s 120 60
> > > > xsetroot -solid black
> > > > xrdb ~/.Xresources
> > > 
> > > The above line calling xrdb makes your .Xresources file work.
> > > startx reads ~/.xinit while xdm reads ~/.xsession.
> > 
> > I believe that should read ~/.xinitrc according to startx(1)?
> 
> Yes.
> 
> > > Create a .xsession file which matches your .xinit (or use a symlink)
> > > and xdm should pick .Xresources up, too.
> 
> Thanks for the hint. However, having a ~/.xsession identical to ~/.xinitrc
> still leads to the same behaviour.
> 
> Note that even in a xdm(1) session I do get an UTF8 xterm
> IF I launch it from the command line. So the ~/.Xresources
> must be consulted at some point. It is just that the xterm
> started with cwm's ctrl-alt-del does have XTERM_LOCALE=C

On Feb 16 16:22:36, ji...@devio.us wrote:
> XDM fires up /etc/X11/xdm/Xsession, easy to read. One can even
> customize XDM and all other things in /etc/X11/xdm/xdm-config.
> 
> It should be `xrdb -load $file'.

-load is the default
(To be sure, adding it makes no difference.)


On Feb 18 02:28:35, mark.hellew...@gmail.com wrote:
> If you call the file .Xdefaults it will be used in both scenarios

My .Xdefaults is a symlink to .Xresources
and .xsession is a symlink to .xinitrc.

But that's not it - my .xsession (-> .xinitrc) _is_ processed,
because cwm is launched, as opposed to the default fvwm.
And my .Xresources (= .Xdefaults) _is_ loaded, because
the xterms I start from the cmdline with `xterm`
do have the UTF8 locale set. Also,

        $ env
        [...]
        XENVIRONMENT=/home/hans/.Xresources

> with no need for the `xrdb` command.

Thanks. Yes, even if I do not xrdb explicitly,
the .Xdefauls (= .Xresources) gets loaded.

But the original problem remains: any xterm started with
cwm's ctrl-alt-del reports XTERM_LOCALE=C in env(1),
while an xterm started as `xterm` has XTERM_LOCALE=cs_CZ.UTF-8,
as discated by "XTerm*locale: UTF-8" in .Xresources.

Is it a cwm thing after all?


        Jan

Reply via email to