Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2879  / 1 Year ago, wed, february 8, 2023, 7:09:15

I am building a PC and a BeagleBords ARM embedded for public use. They run Ubuntu 13.04 and manually assembled Linux respectively.
Is there a way to prevent them from being shut down on pressing Shutdown button (on case, not on keyboard)? Sure, I can do it in hardware. I just prefer software solutions.
If somebody can say for sure "this is impossible" it would be a useful answer too.



Result: Ok, I understood it. One can prevent shutdown on press, but not on long press. I will have to make hardware switch to plug off Power button when needed.


More From » shutdown

 Answers
3

You can use next command in terminal:



sudo chmod -x /sbin/shutdown


If you want to re-enable, use +x instead -x in the same command.



Anyway, by holding the power button down for several seconds the above solution will not work and I don't think that you will find a software solution for this case.


[#30315] Friday, February 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tatoethin

Total Points: 377
Total Questions: 110
Total Answers: 98

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;