I'm confused about using setxkbmap
. When I use it in my terminal emulator under X, it works:
setxkbmap -layout gr -option # switches layout to greek
However, if I switch to tty2, execute the command (with proper DISPLAY set) and switch back to X, layout does not change:
DISPLAY=:0 setxkbmap -layout gr -option
What am I doing wrong?
Best Answer
The X server must be active when you execute that command from a TTY.
So I recommend you to execute that command and then, immediately switch to your X display for the changes to be applied.
You can see this behaviour on the
xclip -o
command. When executed on the TTY, it waits before the X server is active to print out the content of the primary clipboard.