I've been testing various systems on my pc, and from time to time, my Linux laptop freezes.
On Windows, when this happens, you can press Ctrl+Alt+Del to bring up Task Manager and kill the process slowing the system down, no matter how badly locked up everything else was. I don't know how this was implemented; I guess it's like an emergency command, that forcibly reserves or steals some RAM from other processes.
Some of the questions asked here have similar solutions to that, like cold rebooting, restarting only the GUI or "kill mouse" that kills anything you click on, but I don't like 'em.
I want to make Ctrl+Alt+Del or any other hotkey, no matter what, bring up a "working" terminal with root privileges in seconds, so I have full control over my PC, no matter what programs are running or how much RAM is being used. It should be an emergency app that can be used any time with guarantee it will work. Is this even possible, and how should I do it?
nice
question (man nice
) – you could set one TTY as your emergency TTY and runbash
with a super-low niceness likenice -n -20 bash
and/or (even better!) programs known to cause trouble with a higher one in the first place, likenice -n 10 firefox
. – dessert Oct 23 '17 at 17:25/usr/bin/nice -n -20/usr/bin/yakuake
. This will run it (and every child I suppose) with the niceness most favorable to the process, which should allow you to use the program even while others try to eat up your system's resources. – dessert Oct 29 '17 at 10:21