I was playing with gedit /usr/share/X11/xkb/symbols/pc in an attempt to change a couple of keys, and now have a totally dead keyboard.

Trying to do anything with a computer which won't respond to any form of keyboard entry has proven really, really hard.

I've tried adding replacement keyboards via bluetooth, which hasn't worked. I've added new keyboards, but these aren't recognized.

I've used character map to enter my system password, but don't appear to be able to use it in a terminal because I can't perform a carriage return. So I haven't been able to 'gedit` the original file to make an amendment to the mistakes I clearly made beforehand.

I've tried SSH from other machines, but not having a lot of luck right now. I've also looked across the web and it seems I'm the only idiot who's killed his Ubuntu installation. I'm not a Linux expert by any means, but this old machine had become my main computer and I'd like to get it working again.

I have a Raspberry Pi which I could use to SSH in, but not sure if SSH is enabled on the target Ubuntu machine. It hasn't worked so far.

If anyone could give me any advice on:

  1. How to perform a carriage return in terminal when I don't have a keyboard.
  2. How to reset the keyboard mappings.
  3. Maybe installing VLC on Ubuntu so I can login using the Pi.
  4. Any advice on how to get back in using SSH using the Pi.

Clearly I've mucked it all up, just wish I had some way of trying to fix things again.

Thank you. This is the first time I've really stuffed myself in years. ;)



Boot from the installation media. Once in a live session, open a terminal and mount your root file system on /mnt, then copy over the file from the live session to the mounted root filesystem:

cd /mnt/usr/share/X11/xkb/symbols
sudo cp -a /usr/share/X11/xkb/symbols/pc .

Unmount /mnt and reboot. Everything should work. For added peace of mind, you may want to reinstall xkb-data.


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.