My Setup:
Server: Ubuntu 16.04 Desktop (German) with x11vnc
Client: Windows 7 (German) with TightVNC
Problem:
After each boot the VNC session has a wrong keyboard layout (e.g. | produces ').
My solution:
Open a terminal within the VNC session and call sudo dpkg-reconfigure keyboard-configuration, accepting all defaults
Output in the console:
Your console font configuration will be updated the next time your system
boots. If you want to update it now, run 'setupcon' from a virtual console.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-initramfs: deferring update (trigger activated)
Trigger für initramfs-tools (0.122ubuntu8.8) werden verarbeitet ...
update-initramfs: Generating /boot/initrd.img-4.4.0-64-generic
(Sorry for the german "Trigger für ...")
Now I realized that not all steps are necessary: The layout is already corrected before the line update-initramfs: deferring ... appears.
In fact, I can even press Ctrl-C directly after returning from the 'graphical' screens and it still fixes the problem.
So I wonder:
- What is happening that actually sets the correct VNC mode?
- Is there another way to achieve this effect?
- Whou could walk me through until I found the solution?
I'm glad to provide more information as requested.
Cross-reference to similar questions:
x11vnc under Ubuntu 16.10 - wrong keyboard mapping when accessing from Windows 7
X11VNC & TightVNC Viewer some keys don't work
Different problem without a solution:
VNC: pressing Shift + Tab = Tab only
Can anybody give a hint as to what happens under the hood of sudo dpkg-reconfigure keyboard-configuration?