How can I show a message before shutting down on Pika OS?

0
5
Asked By MellowCedar42 On

I'm using Pika OS, which is Debian-based, and I'd like to display a short message such as "Turn 'em off" immediately before the computer shuts down. The exact format doesn't matter—I just want the message to appear briefly before shutdown begins.

3 Answers

Answered By SilverPine88 On

The `shutdown` command can also schedule a shutdown and announce it to logged-in users. Check `man shutdown` for the available options on your version of Pika OS, including how to set a delay and broadcast a warning message.

Answered By QuietHarbor19 On

If you want the message to be more visible, you could trigger a screen locker or fullscreen notification first, wait a couple of seconds, and then run the shutdown command. Just be careful when replacing or aliasing the shutdown command so you don’t accidentally create a recursive alias.

Answered By OrbitMango7 On

You can broadcast a message to logged-in terminals with `wall "Turn 'em off"`, then shut down afterward. For example: `wall "Turn 'em off"; sleep 2; sudo shutdown -h now`. The message will appear in active terminal sessions before the system powers off.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.