Page 1 of 1

Shutdown alternatives?

Posted: Sat May 11, 2024 3:19 pm
by tripleb
Meanwhile, my Ubuntu system is ready for use.

One last thing I’m looking for is a way to shutdown this headless system more elegant.
Currently I can
  • Shutdown by MS Remote Desktop
  • SSH to this machine and

    Code: Select all

    sudo shutdown now
Both ways need more or less interaction. I’m looking for something like a power off button in the virtual console which I could trigger by a OSC message. Or something like the opposite of wake on LAN :)

Any suggestions?

Re: Shutdown alternatives?

Posted: Sat May 11, 2024 4:52 pm
by tripleb
Argh, somtimes things are more easy than they look:

1. create a shell script (e.g. poweroff.sh) in your user folder with

Code: Select all

#!/bin/bash
/usr/sbin/poweroff
2. make the script executable
3. create a script function in QLC+ with

Code: Select all

// System shutdown (immediate)
systemcommand:/home/[pathtoyourscript]/poweroff.sh arg: 
Connect it to a button, save and done...