Re: startx vs xdm
> Can you please elaborate on why LC_CTYPE > is the one of the LC_* family to be set? > Or does the current locale support involve > anything else then CTYPE? Aha: find /usr/share/locale
Re: startx vs xdm
On Feb 19 08:53:15, s...@stsp.name wrote: > On Thu, Feb 18, 2016 at 09:44:08PM +0100, Jan Stary wrote: > > Probably not, because if I remove all my .x* files > > and keep just the .Xdefaults -> .Xresources which > > specifies the UTF8 locale for xterm, the same thing > > happens in (the default) fvwm. Namely, > > the xterm started by default has XTERM_LOCALE=C, > > and every xterm started from fvwm's menu has XTERM_LOCALE=C, > > but every xterm I start as `xterm` (from another xterm) > > has XTERM_LOCALE=cs_CZ.UTF-8, as specified in.Xdefaults. > > > > Why is that? Am I missing something obvious? > > > > Jan > > > > Why don't you just set LC_CTYPE in your environment as described here? > http://www.openbsd.org/faq/faq10.html#locales I do. (Actually, LANG) Only last night did I realize it's _this_ that makes them xterms UTF, not the xterm-specific locale in my X settings (see below). > Do you really want to set a separate UTF-8 flag for every application you use? > I think per-application locale knobs are silly. They are legacy cruft added > before somewhat standardized locale support was built into unix systems. > I'm not surprised it doesn't work the way you expect. xterm needs LC_CTYPE > set the environment when it calls setlocale(3) and/or whatever other things > it does to set up its locale. I haven't looked at xterm code to track down > why xrdb locale settings don't apply as you expect, and I'm not going to > because you should really just be exporting LC_CTYPE in your xsession and > be done with this. That's exactly right. Here is what I did, trying to find what's "wrong": Set up a brand new user with nothing in his $HOME, apart from ~/.Xdefaults -> ~/.Xresources which says XTerm*utf8: true XTerm*locale: UTF-8 and ~/.xsession -> ~/.xinitrc which says xrdb -load ~/.Xresources cwm An xterm of this user will not be UTF8, whteher started after startx or from an xdm session, from whichever menu or cmdline. On the other hand, if the brand new user has nothing in his $HOME except ~/.xsession which says export LC_CTYPE="cs_CZ.UTF-8" cwm then his xterm (and anything else, for that matter), will be UTF, as intended. Thank you for the insight. Can you please elaborate on why LC_CTYPE is the one of the LC_* family to be set? Or does the current locale support involve anything else then CTYPE? Jan
Re: startx vs xdm
On Thu, Feb 18, 2016 at 09:44:08PM +0100, Jan Stary wrote: > Probably not, because if I remove all my .x* files > and keep just the .Xdefaults -> .Xresources which > specifies the UTF8 locale for xterm, the same thing > happens in (the default) fvwm. Namely, > the xterm started by default has XTERM_LOCALE=C, > and every xterm started from fvwm's menu has XTERM_LOCALE=C, > but every xterm I start as `xterm` (from another xterm) > has XTERM_LOCALE=cs_CZ.UTF-8, as specified in.Xdefaults. > > Why is that? Am I missing something obvious? > > Jan > Why don't you just set LC_CTYPE in your environment as described here? http://www.openbsd.org/faq/faq10.html#locales Do you really want to set a separate UTF-8 flag for every application you use? I think per-application locale knobs are silly. They are legacy cruft added before somewhat standardized locale support was built into unix systems. I'm not surprised it doesn't work the way you expect. xterm needs LC_CTYPE set the environment when it calls setlocale(3) and/or whatever other things it does to set up its locale. I haven't looked at xterm code to track down why xrdb locale settings don't apply as you expect, and I'm not going to because you should really just be exporting LC_CTYPE in your xsession and be done with this.
Re: startx vs xdm
On Fri, 19 Feb 2016 at 07:49 Jan Starywrote: > Why is that? Am I missing something obvious? > What happens if you launch terminals using the `uxterm` shell script? Mark Jan
Re: startx vs xdm
Thu, 18 Feb 2016 21:44:08 +0100 Jan Stary> > My .Xdefaults is a symlink to .Xresources > > and .xsession is a symlink to .xinitrc. > > Why is that? Am I missing something obvious? $ grep xrdb .xinitrc [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources [[ -f ~/.Xdefaults ]] && xrdb -merge ~/.Xdefaults $ man xrdb -merge This option indicates that the input should be merged and lexicographically sorted with, instead of replacing, the current contents of the specified properties.
Re: startx vs xdm
> 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? Probably not, because if I remove all my .x* files and keep just the .Xdefaults -> .Xresources which specifies the UTF8 locale for xterm, the same thing happens in (the default) fvwm. Namely, the xterm started by default has XTERM_LOCALE=C, and every xterm started from fvwm's menu has XTERM_LOCALE=C, but every xterm I start as `xterm` (from another xterm) has XTERM_LOCALE=cs_CZ.UTF-8, as specified in.Xdefaults. Why is that? Am I missing something obvious? Jan
Re: startx vs xdm
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
Re: startx vs xdm
If you call the file .Xdefaults it will be used in both scenarios described, with no need for the `xrdb` command. On Wed, 17 Feb 2016 at 08:47 Jiri Bwrote: > 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'. > > j.
Re: startx vs xdm
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'. j.
Re: startx vs xdm
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 Jan > > > setxkbmap -layout "us,cz" -option "grp:shifts_toggle,grp_led:scroll" > > > xmodmap ~/.xmodmaprc > > > cwm
Re: startx vs xdm
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)? ^^ > Create a .xsession file which matches your .xinit (or use a symlink) > and xdm should pick .Xresources up, too. > > > setxkbmap -layout "us,cz" -option "grp:shifts_toggle,grp_led:scroll" > > xmodmap ~/.xmodmaprc > > cwm
Re: startx vs xdm
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. Create a .xsession file which matches your .xinit (or use a symlink) and xdm should pick .Xresources up, too. > setxkbmap -layout "us,cz" -option "grp:shifts_toggle,grp_led:scroll" > xmodmap ~/.xmodmaprc > cwm