Great! We’ve documented this problem here:
https://www.nomachine.com/TR09Q09412
It is due to X.org not setting correctly the keyboard options for the XTEST extension device. Let’s try to work around it.
Create the file .xinitrc
in your home directory (if it doesn’t exist already), and add the following lines (remove the first line if it’s not a new file):
#!/bin/sh
XTEST_ID=$(xinput list | grep -Eo "Virtual core XTEST keyboard\s*id\=[0-9]{1,2}" | cut -d= -f 2)
setxkbmap -device $XTEST_ID -model pc105 -layout it
Run the command chmod +x .xinitrc
to set executable permissions and run it to verify that it works as expected. Each time your X session will start, the script will be executed and it’ll set correctly your layout.