4

Right now, I'm using a line in /etc/crontab to run pm-suspend every 30 minutes, but I would like an application displaying a warning before suspending (for example a countdown in the taskbar). An option to snooze it once for 2 minutes would be great too. Disabling it should take some small effort, at least having to log in as root (it does seem to be keeping me away from the /etc/hosts file where I block time-wasting sites).

It seems like something that should already exist, yet I can't find it anywhere.

2 Answers 2

1
+50

I found this script for a suspend timer with warnings. If you would run this as a cronjob, all you would have to do for snoozing is creating a launcher (or whatever you wm calls it, a link on the desktop, taskbar, wherever you want it) that restarts the current job (with 30 min timer) and execute the script once with a two minute timer.

2
  • Well, this is more of a hint about how to do it myself rather then a solution, but I guess the bounty goes to you. Thanks.
    – M.K.
    Aug 28, 2012 at 21:19
  • @M.K. well, thank you. I hope this really helps you to solve your problem.
    – Michael K
    Aug 28, 2012 at 22:35
1

-----------You can use:-----------

shutdown -h [minutes]

To shutdown the computer after [minutes]. For example:

shutdown -h 10

This command will shutdown your computer after 10 minutes.

-----------Or you can use:-----------

shutdown -r [minutes]

To shutdown the computer after [minutes]. For example:

shutdown -r 10

This command will reboot your computer after 10 minutes.

-----------And you also can use:-----------

shutdown 2:00

Shutdown the computer at 2-oclock

1
  • 2
    I want suspend, not shutdown. And yes, I know I can just use 'sleep X; echo "warning"; sleep 120; pm-suspend', but I want something that will show me a warning in the taskbar (or any other visual way), not on the command line that I don't use when wasting my time on the internet.
    – M.K.
    Aug 26, 2012 at 10:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .