If you haven't set the keyboard layout system-wide, you can specify it in Xfce 4 Settings Manager
.
For Setting Keyboard Layout, do the following steps:
Open Xfce 4 Settings Manager :
Menu ⟹ Settings ⟹ Settings Manager
Click on the Keyboard icon.
Switch to the Layout tab.
Uncheck Use system defaults
Click the Add button and choose the appropriate keymap from the list.
Select the active layout.
For editing shortcuts, do the following:
Xfce4 parameters ⟹ window manager settings ⟹ Keyboard tab
In addition, if you want to switch between different layouts, you can use and download its plugins.
N.B. If above solutions didn't help, I recommend you read this article, I haven't tried that myself, but I think it might help. On this step if you are faced with any problem, the solution provided here from askubuntu might help.
If your system has changed to systemd you should be able to control the global setup with the localectl
command. Check the current settings with
$ localectl status
List the possible keyboard variants, including dvorak, with
$ localectl list-x11-keymap-variants
Set the new global keyboard and locale with
$ localectl set-x11-keymap ...
where you need to give, in order, the layout, model, and variant (dvorak). Use the layout and model got from the status output. See man localectl
.
Normally, the set-x11-keymap
option is
supposed to change the console tty keymap automatically as well. However, if it doesn't do a good enough job, you can explicitly set the console tty keymap eg with
$ localectl --no-convert set-keymap us-dvorak
(Use --no-convert
to not disturb the X11 map).
Use localectl list-keymaps
to see what dvorak names are possible.
Best Answer
Check out this archlinux forum thread Xmodmap Reset after Suspend to RAM. There are several examples in the thread that'll get you started and show you how to setup a hook which will get triggered via the power management subsystem that will run your
xmodmap
setup each time you come out of suspend.Something like the following script, saved as
/etc/pm/sleep.d/11suspend
(change theme
in/bin/su - me
to your actual username):