I do a change in my current keyboard layout English(US-Dvorak) but it does not react with the following code without changing back-and-forth to another keyboard layout, for xserver reloading

# restore your current keyboard settings; 
sudo apt-get install --reinstall xkb-data
# you close also extra Control at Capslock etc
gsettings set org.gnome.desktop.input-sources xkb-options "[]"

# do any change in `/usr/share/X11/xkb/symbols/us`; etc add about 3rd level config for some [A,a] like [A,a,x]. 

sudo dpkg-reconfigure xkb-data

# TODO Is there any command which can cause reload of xserver regardless you have active your current keyboard where you do the change?

I do not want to manually cause the reloading of xserver by doing such a switch. It would be great to do by a one-liner.

Systems: Ubuntu 16.04
Linux kernel: 4.6
Keyboard model: pc105
Keyboard layout: English (Dvorak) = US-dvorak
Related thread: here about How to Get A with Dots in Dvorak of Ubuntu 16.04?

2 Answers 2


From here:

To apply new [keyboard] settings, restarting the keyboard-setup service should suffice, otherwise you can try to restart kernel input system via udev:

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

For completeness, restarting keyboard-setup would look like

# For Ubuntu < 16.04
service keyboard-setup restart
# For Ubuntu >= 16.04
systemctl restart keyboard-setup
  • 1
    perfect! Had to use sudo udevadm ... though.
    – Adam
    Commented Aug 6, 2019 at 14:03

I could not find here anything stable solution but to restart the system. Xserver gets confused very fast, which I could resolve only by restarting the system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .