I've set up a VM with VirtualBox.

The problem is that the guest system doesn't capture all keys. Although, the option Auto Capture Keyboard is set. Keys like Super or shortcuts like Alt+Tab are always handled by the host system and not by the guest as I would expect.

How can I capture all keys (except the Host Key) within the guest system?

Host: Linux arch 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64 GNU/Linux

Guest: Linux kali 4.9.0-kali4-amd64 #1 SMP Debian 4.9.25-1kali1 (2017-05-04) x86_64 GNU/Linux

  • What window manager are you running on the host? – Gilles 'SO- stop being evil' Jun 5 '17 at 23:23
  • XDG_CURRENT_DESKTOP=GNOME and GDMSESSION=gnome – S1J0 Jun 7 '17 at 9:03
  • 1
    I guess the host system is using Wayland. – Axel Sommerfeldt Jun 7 '17 at 19:54
  • 1
    yes, it is: XDG_SESSION_TYPE=wayland – S1J0 Jun 8 '17 at 22:48

Changing the XDG_SESSION_TYPE from wayland to x11 solved the problem. The following line in the /etc/gdm/custom.conf file has to be uncommented:

  • That is one way to do it, but what if I still want to use wayland? Boxes seem to work fine. – Calin Nov 3 '17 at 14:42
  • Did you ever figure out a solution? – christophetd Apr 30 '18 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.