My brother also uses my computer, and when he does, he always powers it off by holding the power button for five seconds. I am getting very annoyed at this and he won’t stop, so I am thinking that I will set up a jump scare that happens whenever the power button is pressed. I plan for it to be a simple shell script started by my desktop environment when a user logs in. I just have a few questions before I start:
What is the easiest way to detect when the power button is pressed?
How would I display a large image on the screen?
How would I play a sound effect?
I am using Debian GNU/Linux 9.3 with the LXDE desktop environment. I plan to implement this as a Bash script.