Log in to the terminal on ubuntu, set DISPLAY = localhost: 0.0 then run xmodmap in that terminal, on vm.
The X mapping is performed in two parts: the client program, xterm or xmodmap and the server, the process talking to the (virtual) display. xmodmap tells x to interpret keys in different ways.
You would do this as if you were sitting on a machine that works with ubuntu directly. Xmodmap happens on vm and modifies the x server running on the virtual machine. ... as stated above.
If you were in ssh in vm, the key must correctly set DISPLAY. This should tell Xmodmap where to find the server x.
Sorry I donβt have time to check this exact situation. Comment with questions. -Chris
Chris source share