16

I seem to remember that a few years back, in order to login on Windows you had to type Ctrl-Alt-Del to get a login screen.

The advantage of this was that if you had a cat or child that liked to press random keys on your computer keyboard, they wouldn't screw things up. Well, my kids are in their 40s now, but I do have a cat that likes to walk over the keyboard from time to time, and believe it or not - that requires a reboot to recover from the consequences.

Is there anything (short of hiding the keyboard) that can be done about this?

Braiam
  • 69,112

5 Answers5

17

Switch to virtual console x (x ≥ 8) (CtrlAltFx, say x = 12). Those don't have getty or LightDM (or anything, really) running on them, so the cat can walk over the keyboard to its heart's content. Then press CtrlAltF7 to get back to LightDM and the login screen.

You could automate this during boot by adding chvt 12 to /etc/rc.local (see this U&L post).

Special buttons like the power button might still be a cause for concern.


On second thought, other key combinations are available:

  • if the virtual console is not running X, then the CtrlAltFx can be used without Ctrl - just AltFx would work.
    • Alt+ arrow keys can also be used to switch to the previous and next VTs
    • CtrlAltDel triggers a reboot in any of the VTs not running X.

So a better solution might be running an empty X session (not running any other application) in VT12 to cut down the number of available key combinations and switching to it.

startx -- :100 vt12 &
chvt12

This needs to be tested (you might need to write an .xinitrc to override the defaults).

muru
  • 207,228
7

You can to the same by pressing

Ctrl+Alt+L

This will lock the screen and require the password to unlock it.

Pilot6
  • 92,041
5

Some related bug reports on Launchpad:

Those bugs describe that lightdm (the package behind your login screen) experiences some kind of keyboard input buffer overflow if you keep on hitting keys on the lock or login screen.

The primary bug report mentions that a fix for this bug was finally released for 16.04:
They now limit said input buffer to 200 characters to prevent it from getting filled up with insane amounts of data.


So the hanging up if a cat sits on a keyboard on the login screen should be fixed in 16.04 now (maybe you want to upgrade?).

However, I don't think that older releases would profit from a setting that requires you to hit Ctrl+Alt+Del before logging in, as that would then probably be a feature of lightdm itself again and would likely not help and suffer from the same bug...

Byte Commander
  • 110,243
2

Place pre-warmed cardboard boxes near the keyboard. The cat will default to sitting in these and will leave your computer alone.

0

Excessive keyboard input is known to hang the LightDm screen.

There is currently no way to prevent the problem from happening, however you can easily remove the characters from the login box by pressing Shift+Home (to select all) then Backspace (to delete). It may take a few seconds before the machine becomes responsive again.

Note that the issue has been fixed in the next version of Ubuntu.

dotancohen
  • 2,864