Hi Stuart, hi Jean-Micel,

Stuart Henderson wrote on Thu, Mar 13, 2025 at 03:20:23PM -0000:
> On 2025-03-13, Stuart Henderson <stu.li...@spacehopper.org> wrote:
>> On 2025-03-12, BESSOT Jean-Michel <jean-michel.bes...@lacomte.net> wrote:

>>> adding -u to the command solve the problem.

>> If you remove that and add setting LC_CTYPE to .xsession as recommended
>> in https://www.openbsd.org/faq/faq10.html#locales, does that work too?

> On 2025-03-13, BESSOT Jean-Michel <jean-michel.bes...@lacomte.net> wrote:

>> It is the same.

> In case it wasn't obvious, you would need to restart X to test that - the
> idea is that LC_CTYPE (or any other locale-related variable) should be set
> in the environment *before* starting the window manager, so that programs
> started directly by the wm inherit it.

>> The bug was found by Ingo Schwarze and he has contacted the maintainers 
>> of spectrwm.
>>
>> If you want more info : 
>> https://marc.info/?l=openbsd-misc&m=174171669206229&w=2

> I'm not convinced.
> 
> Unless it's actually starting something as a "login shell",
> I don't think it should do anything with your .profile.

Actually, after considering your reasoning, i find it convincing.
There *is* value in applying a configuration file only to the program
it is intended for and not to random other programs.

I never saw the problem because in my own fvwm(1) configuration, i use

  AddToMenu terminal
  + "xterm" Exec xterm -ls -geometry 80x80

i.e. i explicitly tell the wm to start a login shell in each new
terminal window.

However, *if* i add a line

  "tmux" Exec xterm -e tmux

and then reload the window manager, i.e. use a menu entry to start tmux(1)
in a terminal without explicitly using a login shell, i can reproduce
Jean-Micel's original problem even with the default fvwm(1) window manager.
And if i then add

  export LC_CTYPE=en_US.UTF-8

to my .xsession before the line

  /usr/X11R6/bin/fvwm

the problem goes away even without the "tmux -u" workaround.
That confirms all that you, Stuart, say.

> It's the same for any software started directly by any window manager.

That, indeed, is a strong argument against trying to solve it in
spectrwm, and a strong argument for using the general solution already
documented in FAQ 10.

Yours,
  Ingo

Reply via email to