Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have this in my .xinitrc:

setxkbmap -layout "jp,ru" -option "grp:alt_shift_toggle"

(I'm in Japan, have a local keyboard, and occasionally use the Russian keyboard layout)

This works fine, most of the time:

misha@misha-lmd:~$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     jp,ru
options:    grp:alt_shift_toggle

But occasionally, I'm no longer able to switch to Russian. When I repeat the above command, I get:

misha@misha-lmd:~$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     jp
options:    grp:alt_shift_toggle

So something is changing the X keyboard layout. What could it be, and how do I get rid of it? It's annoying to have to do setxkbmap -layout "jp,ru" -option "grp:alt_shift_toggle" every time the Russian layout stops working.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Ubuntu intermittently checks if there are X settings and removes them to prevent conflicts with dbus's window manager configuration.

Instead of using X settings you should configure the keyboard using dbus.

share|improve this answer

This worked for me: I noticed Fcitx (https://wiki.archlinux.org/index.php/fcitx) was being run on the start. So I configured Fcitx for my layout and got it resolved.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.