In case I'm ever raided or realise that I'm being spied upon whilst using my computer, is there a way in Ubuntu I can have a pre-set 'panic button' or series of keys that can log me out or secure my machine?
2 Answers
If you only want to log out, there is a very quick way of doing it: ctrl + alt + del → enter and you're logged out. You don't need to look at any graphical stuff or do anything with your mouse which would take a lot of time which you might not have.
However, I'd recommend shutting the system down to clear your ram, if you're paranoid (which I also recommend). Do do this, set a key combination to gnome-session-quit --power-off. Simply launch "Keyboard" from the dash and switch to the tab "Shortcuts". Under "custom shortcuts" you can ... well ... add a custom shortcut. Use the command stated above and a simple key combination with only 2 keys, so it goes fast.
From then on you can press whatever key combination → arrow left → enter and your machine shuts down. Again, you don't need to look at your screen and see whats happening.
- 5,910
- 10
- 34
- 68
There is something known as magic SYSRQ key. It's usually located on the same key as PRTSC. The typical usage is to safely reboot / power-off the system when it becomes unresponsive.
In particular , holding ALT+SYSRQ and pressing one by one REISUB safely reboots the system.
Holding ALT+SYSRQ and pressing one by one REISUO safely powers-off the system.
Now, if your goal is to abruptly power-off the system , holding ALT+SYSRQ and then pressing O should do the trick, but keep in mind that possible loss of data may occur.
Alternatively you can send SIGKILL to all processes except init with I key or cause a system crash with C
If you want to merely lock the GUI screen, use Super+L shortcut.
If you want to kill your username out of GUI and console session, use killall -u username
If you are concerned about the security, full-disk encryption is probably a thing to consider. Working from a virtualbox OS with encrypted virtual disk is also a thing to consider.
- 107,582