Debian Stretch 9: What changed to keyboard configuration (in X)?

4

2

Up to Debian 8, I could configure the keyboard this way:

setxkbmap -model pc105 -layout us -variant alt-intl

How do I achieve the same effect in Debian Stretch? What has changed?

I do remember that, at some Debian version, I had to do that command after every X start, but it was still OK for me.

Since I installed Debian Stretch, that command will no longer take any effect. Yes, it does think it is working:

setxkbmap -query rules: evdev model: pc105 layout: us variant: alt-intl options: terminate:ctrl_alt_bksp

But it isn´t.

I managed to get it working eventually with: ibus-setup #interactive sudo ibus-daemon --xim &

But, apart from being interactive, that thing is random. Sometimes the keyboard is just going back to the crazy default layout it thinks it should apply (once even in the middle of a job coding interview!). I use English language:

echo $LANG en_US.UTF-8 I selected Netherlands timezone and an international layout with deadkeys; that´s all. I never tried to set anything related to locales that aren´t the standard US-ish-ENG-ish things.

I hope the reason it was changed it is being very useful for many people, because, It´s difficult to understand why configuring such a basic thing just the way it has worked for decades had to become so complicated nowadays.

Things I already tried and had no effect, even after restarting:

1) sudo dpkg-reconfigure keyboard-configuration

2) setupcon

3) sudo setupcon

4) udevadm trigger --subsystem-match=input --action=change

5) sudo apt-get install -y console-data console-setup console-locales keyboard-configuration

6) sudo apt-get remove ibus -y followed by an X restart.

7) rm /var/lib/xkb/*.xkm rm: cannot remove '/var/lib/xkb/*.xkm': No such file or directory

8) setxkbmap -rules evdev -model evdev -layout us -variant alt-intl

Nothing of that made the configurations made by first setxkbmap to take effect again and kept the same weird default.

Things I already tried and returned the keyboard to vanilla us (without accents/deadkeys):

1) setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl

2) setxkbmap -rules evdev -model pc105 -layout us -variant altgr-intl

3) setxkbmap -rules evdev -model evdev -layout us -variant altgr-intl -option eys # no complain of bad options

4) setxkbmap -rules evdev -model pc105 -layout us -variant altgr-intl -option #clears option

5) setxkbmap -rules evdev -model pc105 -layout us -variant intl -option

6) setxkbmap -rules evdev -model pc105 -layout us -variant altgr-intl -option terminate:ctrl_alt_bksp #control-alt-backspace option

ribamar

Posted 2018-02-08T14:36:07.620

Reputation: 41

1What happens if you place the setxkbmapdpkg command in ~/.xsessionrc ? – harrymc – 2018-10-06T15:28:29.080

Which exact distro & DE are you using? – Xen2050 – 2018-10-11T20:52:15.247

Update: After 10 months "You've earned the "Popular Question" badge (Question with 1,000 views) for "Debian Stretch 9: What changed to keyboard configuration (in X)?"." , spent all my reputations on unsuccessful bounties. Those are for me clear signs that there is no solution. – ribamar – 2018-12-20T13:21:24.073

Answers

2

I was arount 3 hours dealing with this, on a Debian 9 with xfce4 there was no way to put default keyboard settings using any command even using the UI keyboard configuration of xfce4... BUT... this worked just fine:

echo '
# Set default keyboard for X:
sleep 2
if [ -n $DISPLAY ] ; then
    setxkbmap -model pc105 -layout es -variant winkeys -print | xkbcomp - $DISPLAY
fi
' \
 | sudo tee -a ~/.xsessionrc

the sleep command is mandatory in order to get it working.

Braian

Posted 2018-02-08T14:36:07.620

Reputation: 21

0

This worked for me:

sudo dpkg-reconfigure keyboard-configuration
sudo service keyboard-setup restart

And then restart

David Ramírez

Posted 2018-02-08T14:36:07.620

Reputation: 1

not for me -- it was the first thing I tried and surely I tried restarting it. – ribamar – 2018-10-06T13:54:17.837