Hi,
I'm currently fiddling with CentOS 7 and KDE 4.14, and I must say, I'm pleasantly surprised. This is one of the cleanest implementations of KDE I've ever seen, and with some tweaking (a lot, in fact) this can be turned into a highly functional desktop with all the bling and bells and whistles.
But right now, I have some minor problems to solve. First things first. My system is installed in French, with a swiss french keyboard (fr_CH-latin1) as default. This works OK in console mode, but when KDE launches the first time, the default keyboard is US, and there's a french (fr-latin1) alternative configured.
In my humble opinion, this looks like a minor bug, because the default keyboard should be the same as the one defined in the installer. Now I know this can be changed easily, but I'm planning to use this in a few production environments like our local school. Which would mean I have to log into every single account to switch the keyboard layout manually.
Now I wonder if this can't be done by the way of a profile in /etc/skel. I've already created a custom user profile for my users, to be put in /etc/skel. I have a little script that puts all these in the right place:
https://github.com/kikinovak/centos/tree/master/el7/kde
If I create a few custom keyboard layouts in KDE (say french, swiss french and german), are these stored somewhere locally in ~/.kde/share? I searched around a bit, but couldn't find the place.
Any suggestions?
Niki
On 10.11.2016 08:30, Nicolas Kovacs wrote:
My system is installed in French, with a swiss french keyboard (fr_CH-latin1) as default. This works OK in console mode, but when KDE launches the first time, the default keyboard is US, and there's a french (fr-latin1) alternative configured.
XFCE user here, so I'm not sure if KDE tries to enforce its own settings with regard to the keyboard layout, but have you tried (as root):
localectl set-x11-keymap <whatever name the Swiss-French layout might have> pc105 nodeadkey
This changes the X11 keyboard settings permanently for all users on the system and works fine with (at least) XFCE.
Patrick
Le 14/11/2016 à 12:49, Patrick Hess a écrit :
XFCE user here, so I'm not sure if KDE tries to enforce its own settings with regard to the keyboard layout, but have you tried (as root):
localectl set-x11-keymap <whatever name the Swiss-French layout
might have> pc105 nodeadkey
This changes the X11 keyboard settings permanently for all users on the system and works fine with (at least) XFCE.
Patrick
Thanks for your response. (Native german speaker here also.)
I tried what you suggested:
# localectl set-x11-keymap fr_CH-latin1 pc105 nodeadkey
As is to be expected, this modifies /etc/X11/xorg.conf.d/00-keyboard.conf:
# Read and parsed by systemd-localed. It's probably wise not to edit this file # manually too freely. Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "fr_CH-latin1" Option "XkbModel" "pc105" Option "XkbVariant" "nodeadkey" EndSection
Unfortunately, to no avail. When I create a new user from here, KDE's keyboard still defaults to US.
This looks like a CentOS bug to me: unable to define a non-US system-wide keyboard when using KDE.
Cheers,
Niki
On 14.11.2016 14:33, Nicolas Kovacs wrote:
# localectl set-x11-keymap fr_CH-latin1 pc105 nodeadkey
As is to be expected, this modifies /etc/X11/xorg.conf.d/00-keyboard.conf:
Interesting, I didn't actually realize that myself before.
Option "XkbLayout" "fr_CH-latin1"
According to this link
https://wiki.manjaro.org/index.php?title=Configuration_du_clavier_apr%C3%A8s...
the XkbLayout should read "ch(fr)" instead of "fr_CH-latin1", as the system console and X.org seem to use a different notation for selecting the layout in this particular case:
- Dans le terminal - Pour la Suisse romande: loadkeys fr_CH-latin1
- Dans X11 / Xorg - Configurer le clavier de manière permanente: Option "XkbLayout" "ch(fr)"
Then, this should work as well:
localectl set-x11-keymap 'ch(fr)' pc105 nodeadkey
This looks like a CentOS bug to me: unable to define a non-US system-wide keyboard when using KDE.
That could be possible, of course. On FreeBSD, with the keyboard layout configured the old-fashioned way via /etc/X11/xorg.conf, KDE does respect the system-wide settings. I would expect KDE to behave the same on CentOS. However, I only had to deal with easy layouts like "de" and "us" so far; Swiss-French might pose a bit more of a challenge. ;-)
Patrick
Le 14/11/2016 à 17:33, Patrick Hess a écrit :
That could be possible, of course. On FreeBSD, with the keyboard layout configured the old-fashioned way via /etc/X11/xorg.conf, KDE does respect the system-wide settings. I would expect KDE to behave the same on CentOS. However, I only had to deal with easy layouts like "de" and "us" so far; Swiss-French might pose a bit more of a challenge. ;-)
Patrick
I'm running Slackware on my main workstation, where I have a 90-keyboard-layout.conf file in /etc/X11/xorg.conf.d, and it looks like this:
Section "InputClass" Identifier "keyboard-all" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "XkbLayout" "ch" Option "XkbVariant" "fr" Option "XkbOptions" "terminate:ctrl_alt_bksp" EndSection
But then, I'm also running Xfce on this machine, so I don't know if on the CentOS machine, the problem is related to localectl, to X.org or to KDE.
I tried to replace the CentOS configuration stub with the one I have on the Slackware machine, but to no avail. The keyboard is still US. While it's not a big deal, of course, I'd rather avoid having to reconfigure all my users' keyboard layout by hand.
Cheers,
Niki
On 14.11.2016 17:55, Nicolas Kovacs wrote:
But then, I'm also running Xfce on this machine, so I don't know if on the CentOS machine, the problem is related to localectl, to X.org or to KDE.
Alright, I just installed KDE in an existing VirtualBox VM (so that I can easily undo everything later) that used to be "fully Germanized", and then tried to switch the whole system over to French:
virtualcentos7:~ > localectl System Locale: LANG=fr_FR.UTF-8 VC Keymap: fr-nodeadkeys X11 Layout: fr X11 Model: pc105 X11 Variant: nodeadkeys virtualcentos7:~ > getafrencherrormessage bash: getafrencherrormessage : commande introuvable
So far, so good. Here's where the fun begins... XFCE talks to me in French, whereas KDE still insists on speaking English (there's probably a separate package that needs to be installed, but who cares). What's more important, the keyboard layout in GDM, XFCE and KDE is still *German*! In fact, even GDM still offers only German and US layouts to choose from.
Honestly, I have no clue what's going on here anymore. I surely must be missing something.
I tried to replace the CentOS configuration stub with the one I have on the Slackware machine, but to no avail. The keyboard is still US. While it's not a big deal, of course, I'd rather avoid having to reconfigure all my users' keyboard layout by hand.
Well, there's always "setxkbmap 'ch(fr)'" that you could run automatically when a user logs in. And this *does* actually work here, e.g. pressing the Ö key on my German keyboard causes an é to appear, which should correspond to a Swiss-French layout. I'm not entirely sure what the best place to put this command would be, though. Maybe /etc/profile or ~/.profile?
test -n "$DISPLAY" && setxkbmap 'ch(fr)'
After all, this doesn't look like a KDE issue to me. Let's blame systemd, shall we? ;-)
Patrick
Le 14/11/2016 à 20:16, Patrick Hess a écrit :
After all, this doesn't look like a KDE issue to me. Let's blame systemd, shall we? ;-)
I just filed a bug report:
https://bugs.centos.org/view.php?id=12234
Cheers,
Niki