Discussion:
First time with freebsd and weird keyboard issue
(too old to reply)
Dominique Michel
2024-11-26 10:39:12 UTC
Permalink
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"

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

After logout and login, the keyboard stopped to work well in both
accounts. I get the correct language map (keys like q and z are at the
right place), composed keys like [ and { are fine, but the same keys as
simple keys à and è (the accented keys) doesn't work anymore, they are
dead.

If I comment these lines in .login_conf and remove the file generated by
cap_mkdb, the keyboard is working fine again.

As a freebsd newbie, maybe I missed something, but I think that issue
should be reported to you anyway.

# # #

Launching fvwm-crystal with fvwm3 (or fvwm2) via startx, I get an even
weirder keyboard issue,
see https://forums.freebsd.org/threads/wrong-keyboard-map-in-x.95778/

Best,
Dominique


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Lars Engels
2024-11-26 14:57:32 UTC
Permalink
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"
>
> 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

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.

Another run cap_mkdb /etc/login.conf should fix it.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dominique Michel
2024-12-03 09:20:26 UTC
Permalink
Le Tue, 26 Nov 2024 14:57:32 +0000,
Lars Engels <***@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"
> >
> > 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
>
> 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.

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 ().

Dominique


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Vadim Goncharov
2024-12-03 10:07:39 UTC
Permalink
On Tue, 3 Dec 2024 10:20:26 +0100
Dominique Michel <***@gmail.com> wrote:

> Le Tue, 26 Nov 2024 14:57:32 +0000,
> Lars Engels <***@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


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...