Re: First time with freebsd and weird keyboard issue

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Tue, 03 Dec 2024 11:46:23 UTC
On Tue, 3 Dec 2024 13:07:39 +0300
Vadim Goncharov <vadimnuclight@gmail.com> wrote:

> On Tue, 3 Dec 2024 10:20:26 +0100
> Dominique Michel <dominique.c.michel@gmail.com> wrote:
> 
> > Le Tue, 26 Nov 2024 14:57:32 +0000,
> > Lars Engels <lme@FreeBSD.org> a écrit :
> > 
> > > Dominique Michel schrieb am Dienstag, 26. November 2024 11:39:12
> > > (+01:00):
> > >   
> > > > Hi,
> > > > 
> > > > I am the main fvwm-crystal maintainer and I am working on adding
> > > > freebsd support to it. To do that, I installed the last freebsd
> > > > version and I saw a double issue with the keyboard.
> > > > 
> > > > First:
> > > > In /etc/rc.conf
> > > > keymap="ch-fr.acc.kbd"
> 
> This is for console keyboard, it has nothing to do with X11.
> 
> > > > In order to understand how to reproduce these issues, I do 2 test
> > > > user accounts with different shells, sh and bash. With both of
> > > > them, after login, the keyboard is working fine with the ttys.
> > > > 
> > > > Then I followed chapter 25 of the handbook and put in
> > > > ~/.login_conf: me:\
> > > > :charset=UTF-8:\
> > > > :lang=fr_ch.UTF-8:
> > > > 
> > > > and ran  cap_mkdb ~/.login_conf    
> 
> That's essentially shell-independet setting of locale environment
> variables.
> 
> > > You only need to run cap_mkdb /etc/login.conf. Your ~/.login_conf is
> > > read automatically upon login. By running cap_mkdb with your own
> > > login config you probably messed up your environment.  
> > 
> > I  followed the handbook: 25.2.1.1. Login Classes Method
> > https://docs.freebsd.org/en/books/handbook/l10n/#login-class
> > 
> > "i Note:	
> > 
> > For an end user, the cap_mkdb command will need to be run on their
> > ~/.login_conf for any changes to take effect."
> > 
> > > 
> > > Another run cap_mkdb /etc/login.conf should fix it.
> > >   
> > 
> > Anyway, I ran that command 1 more time as root and commented out the
> > 'me: ....' stuff in ~/.login_conf. It works fine at the tty, but after
> > startx, that change nothing.
> 
> Yep, because $LANG alone is not enough for full X11 l10n.
> 
> > I found a workaround, it is to install lightdm and start fvwn-crystal
> > with it. And finally, I found a fix. It is to restore the 'me:...'
> > stuff and add in .xinitrc:
> > 
> > setxkbmap -layout 'ch(fr)' -model pc105 -option
> >  terminate:ctrl_alt_bksp,keypad:pointerkeys
> > 
> > Note the single quotes around the layout and the ().
> 
> Without language variables you'll only get keyboard with this and not
> messages, time etc. stuff, e.g. `ls -l` month names in xterm
> 
> -- 
> WBR, @nuclight

Just a pointer.

The same thing is discussed at forums.freebsd.org, too.
Answered by different persons (including me) with different aspects.

 https://forums.freebsd.org/threads/wrong-keyboard-map-in-x.95778/


-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>