Following a post at fascinatingcaptain, I tried remapping F1 to the g key, as my g key has bitten the dust due to mechanical reasons. I added an entry:

key <FK01> {g} ;

(getting the "g" by copy-pasting) to /usr/share/X11/xkb/symbols/pc then as per blog I did:

sudo rm -rf /var/lib/xkb/*

rebooted and voila, no keys at all work. I can't log in except as guest, and can't think of any way to fix this except conceivably booting from a USB, which I'd have to go make on some other computer, and I don't know if I can edit root files that way. I'm in the opposite of terminal land, with mouse only to operate my computer. Logging in as guest (no password required) allows me to bring up a gui keyboard -- on which all keys have been mapped to question marks. Recovery mode gets me to a shell with a working keyboard, but the filesystem is read only. Anybody have some ideas?

  • 2
    Whoever thought rm -rf /var/lib/xkb/* was a good idea ought to be shot. Login from a different computer via ssh, re-install the xkb packages. Read up on xkb before you use it (this will take time), make a new file, never delete old files. Or use xmodmap instead. – dirkt Aug 24 '17 at 21:52
  • being committed to passive resistance I can't condone use of firearms, but given that the captain has no mechanism for feedback, would participate in a nonviolent mutiny . I had blocked ssh due to general paranoia and a hacker-y environment and so was forced to use a boot usb, which interestingly allows write access to the host pc filesystem. – jeremy_rutman Aug 27 '17 at 17:06
  • Ofc a boot USB allows write access to the host system - if you have physical access to the system, you can do anything, including taking out the harddrive and plugging it in a different computer. BTW, SystemRescueCD is a USB image made for this kind of situation. :-) I'd suggest to enable ssh for existing key pairs, and disable passwords. Even if you are paranoid, that's pretty safe. – dirkt Aug 27 '17 at 17:47

I wasn't able to ssh into the computer but did manage to fix the problem by booting from a live USB install disk, which mounts the host (pc) filesystem and allows sudo su.

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.