4

I need a psychiatrist for my PC.

It is convinced it is an iMac (sort of).

Seriously: I have a problem which popped up apparently from nowhere, most likely due to some upgrade with "side effects", but I really do not know what happened.

Granted, I have a rather convolute setup:

  • X64 PC running windows 7
  • VirtualBox headless Virtual Machine running Debian (stretch)
  • I access the VM via ssh (KiTTY) with X11 forwarding
  • Usually I work at the command-line, but sometimes I use graphic programs.
  • I have the current version of VcXserv installed on host to serve Xclients.

This is working since years.

Now suddenly my keyboard started "acting strange" just for X clients (plain ssh terminal is unaffected).

After a lot of digging around I found something:

this is the output of setxkbmap -print -verbose 10:

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules:      xorg
model:      macintosh
layout:     it
options:    grab:break_actions
Trying to build keymap using the following components:
keycodes:   macintosh+aliases(qwerty)
types:      complete+numpad(mac)
compat:     complete+xfree86(grab_break)
symbols:    pc+macintosh_vndr/it+inet(apple)
geometry:   macintosh(macintosh)
xkb_keymap {
        xkb_keycodes  { include "macintosh+aliases(qwerty)"     };
        xkb_types     { include "complete+numpad(mac)"  };
        xkb_compat    { include "complete+xfree86(grab_break)"  };
        xkb_symbols   { include "pc+macintosh_vndr/it+inet(apple)"      };
        xkb_geometry  { include "macintosh(macintosh)"  };
};

Sure enough setxkbmap -model pc105 -layout it solves the issue, but it will be back at next VM boot.

How can I set this permanently? (note I have no local xserver on VM, so I don't have a ~/.xinitrc and similar files)

I would also like to understand what happened. Can someone suggest where to look?

1 Answer 1

0

Try setting a system default for X:

$ sudo localectl set-x11-keymap it pc105

... that may only affect Xservers on the host, but try that first; as a side-effect it'll set an equivalent console keymap which might be part of the wonky detection.

If that doesn't work, just run an appropriate setxkbmap | xkbcomp routine in a ~/.profile or ~/.bashrc:

 if [ -n $DISPLAY ] ; then
   setxkbmap -model pc105 -layout it -print | xkbcomp - $DISPLAY
 fi

That will get run when you log into the SSH session, so any graphical programs you run afterwards should get the right keymap.

1
  • note i don't know KiTTY or VcXserv at all, and either of those may have settings you could tweak. default keymap settings are usually up to the Xserver, so you may have to look there for answers as to what changed.
    – quixotic
    Commented Feb 9, 2017 at 9:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .