I have a home file server with ubuntu 20.04. Experimenting with VLC in terminal and being not a pro user I had accidentally installed Gnome which immediately started doing things it was not asked for. The weirdest one for me at the moment is preventing system from shutting down by power button press depending on HDMI CABLE CONNECTION (!)
Pressing power button makes no effect until the video cable is connected. Once connected (no matter how much time has past) the monitor shows me the login screen with the warning of systems preparing to shut down while some users are still logged in. Timer starts from 60 seconds. But not earlier than the cable is connected. There is no problem to turn it off by "sudo shutdown" from a SSH session. Though I did not really need Gnome there, I'm not going to remove it right now. So please any suggestions on how to make the system handle the power button unconditionally.