Using Tweaks
to set keyboard layout works immediately. After reboot, although the settings I made are kept, Tweaks
is ignored.
I find some solutions on the Internet, but all are related to older ubuntu versions(eg. soltion for older ubuntu versions). I can't find these files mentioned in these solutions on ubuntu 18.04.
[UPDATE]
The changes I made are in Keyboard & Mouse
> Additional Layout Options
> Alt/Win key behavior
and Caps Lock behavior
shown in the screenshot.
The ls -al ~/.config/dconf
command outputs:
total 24
drwx------ 2 wen wen 4096 Aug 20 19:15 .
drwx------ 27 wen wen 4096 Aug 20 15:20 ..
-rw-r--r-- 1 wen wen 13758 Aug 20 19:15 user
I tried cd ~/.config/dconf && mv user user.bak
and reboot. Then the ls -al ~/.config/dconf
command outputs:
total 32
drwx------ 2 wen wen 4096 Oct 20 21:41 .
drwx------ 27 wen wen 4096 Aug 20 15:20 ..
-rw-r--r-- 1 wen wen 4958 Oct 20 21:41 user
-rw-r--r-- 1 wen wen 14064 Oct 20 21:25 user.bak
A new ~/.config/dconf/user
file was created. It seems all settings were reset to default. So I used Tweaks
to set again and it dose change the ~/.config/dconf/user
file.
-rw-r--r-- 1 wen wen 5084 Oct 20 21:47 user
Reboot again, the ls -al ~/.config/dconf
command outputs:
total 32
drwx------ 2 wen wen 4096 Oct 20 21:57 .
drwx------ 27 wen wen 4096 Aug 20 15:20 ..
-rw-r--r-- 1 wen wen 5084 Oct 20 21:57 user
-rw-r--r-- 1 wen wen 14064 Oct 20 21:25 user.bak
The gsettings get org.gnome.desktop.input-sources xkb-options
command outputs:
['altwin:swap_alt_win', 'caps:ctrl_modifier']
The cat /etc/default/keyboard
command outputs:
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
Alt is swapped with Win
andCaps Lock is also a Ctrl
options. @Graham – Hovin Oct 20 '19 at 08:32Additional Layout Options
. I have updated my question.@Graham – Hovin Oct 20 '19 at 09:35Tweaks
, I checked the~/.config/dconf/user
file and it indeed was changed. Then I rebooted and checked the~/.config/dconf/user
file again. It's time stamp was changed. Is it possible that something overwirte this file when I reboot?@GunnarHjalmarsson – Hovin Oct 20 '19 at 14:19xkb-options
are set as expected, they are not overridden at reboot, but still not effective? I'm lost. – Gunnar Hjalmarsson Oct 21 '19 at 12:20Tweaks
shows as expected. If for example I cancel theAlt is swapped with Win
option and choose it again, the keyboard will work as expected. It's pretty annoying. Anyway, thank you.@GunnarHjalmarsson – Hovin Oct 21 '19 at 15:23