You are not logged in.

#1 2011-08-27 10:31:19

nXqd
Member
Registered: 2010-07-01
Posts: 173

Shutdown automatically with prompt

I'm looking for a solution for this and what I'm trying to do is :
init a shutdown when the system inits.
Then before 10 minutes it will be prompted so I can save my work.
It's pretty easy I think but I'm new to linux. I've checked twmn at notification but it's quite large with qt lib so I don't use it. A urxvtc with some text is enough for me smile

Thanks everyone for reading this smile


When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles

Offline

#2 2011-08-27 12:54:36

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: Shutdown automatically with prompt

here you can find an overview of X11 messaging / notification options. Combine that with a simple shellscript and you're done smile

sleep 3600
/usr/bin/notify-send -t 0 "Warning" "Shutting down in 10 minutes"
sudo shutdown -h 600 &

You can cancel the shutdown using `sudo shutdown -c`

Offline

#3 2011-08-27 15:38:44

nXqd
Member
Registered: 2010-07-01
Posts: 173

Re: Shutdown automatically with prompt

Spider.007 wrote:

here you can find an overview of X11 messaging / notification options. Combine that with a simple shellscript and you're done smile

sleep 3600
/usr/bin/notify-send -t 0 "Warning" "Shutting down in 10 minutes"
sudo shutdown -h 600 &

You can cancel the shutdown using `sudo shutdown -c`

Thanks for this, I will try smile


When you live for a strong purpose, then hard work isn't an option. It's a necessity. - Steve Pavlina
dotFiles

Offline

Board footer

Powered by FluxBB