Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] KDE/sddm keyboard layout
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mschraff
n00b
n00b


Joined: 08 Jun 2008
Posts: 70

PostPosted: Sat Oct 05, 2019 7:23 pm    Post subject: [solved] KDE/sddm keyboard layout Reply with quote

Hello,

since a very long time I'm finally back to use linux (more specific: gentoo) again. After some days of work I managed to set up a basic KDE enviroment. One of the problems I'm fighting with is the keyboard layout which is set to US.

sddm-0.18.1-r1
openrc-0.41.2

The sddm login screen only shows the US flag and so the keyboard is set to "qwerty". After logging in I'm able to switch to the german keyboard layout manually with writing
Code:
 setxkbmap de
to the konsole.

Here are my config files:

Code:

/etc/sddm.conf
[General]
Numlock=on

[X11]
DisplayCommand=/etc/sddm/scripts/Xsetup


The entry for numlook seems to work as it is activated after altering the config file. But the "DisplayCommand" seems to fail because the keyboard layout is not switched to german. Here is my script /etc/sddm/scripts/Xsetup

Code:

setxkbmap de


Last edited by mschraff on Tue Oct 08, 2019 5:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1769
Location: United Kingdom

PostPosted: Sun Oct 06, 2019 3:32 am    Post subject: Reply with quote

In my case the file /usr/share/sddm/scripts/Xsetup by default contains only the following [1]:

Code:
#!/bin/sh
# Xsetup - run as root before the login dialog appears


I edited the file to contain the list of keyboards I wanted SDDM to allow me to choose from on the log-in screen:

Code:
#!/bin/sh
# Xsetup - run as root before the login dialog appears
setxkbmap gb,us,br,es


I also have the following in file /etc/X11/xorg.conf.d/00-keyboard.conf (the number in the file name may be different in your case):

Code:
Section "InputClass"
    Identifier "keyboard"
    MatchIsKeyboard "yes"
    Option "XkbLayout" "gb,us,br,es"
    Option "XkbVariant" ""
    Option "XkbOptions" "grp:alt_shift_toggle"
EndSection


So I expect you would need something like this:

/usr/share/sddm/scripts/Xsetup
Code:
#!/bin/sh
# Xsetup - run as root before the login dialog appears
setxkbmap de,us


/etc/X11/xorg.conf.d/00-keyboard.conf (the number in the file name may be different in your case)
Code:
Section "InputClass"
    Identifier "keyboard"
    MatchIsKeyboard "yes"
    Option "XkbLayout" "de,us"
    Option "XkbVariant" ""
    Option "XkbOptions" "grp:alt_shift_toggle"
EndSection


Ref 1. https://fitzcarraldoblog.wordpress.com/2015/12/03/sddm-keyboard-layout/
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
mschraff
n00b
n00b


Joined: 08 Jun 2008
Posts: 70

PostPosted: Tue Oct 08, 2019 5:50 pm    Post subject: Reply with quote

Hello,

thank you very much. That seems to solve my problem. Now the sddm login-screen as well as KDE have the german language set as the standard and offer the us keymap as an option.

So I will set the question to "closed". Thanks a lot!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum