Monday, October 28, 2013

event reminder from the command line

i needed a way to set a reminder on my debian system so that i don't forget to attend meetings, since i don't have access to my online calendar. so after some googling, i've found a solution using the at command and zenity dialog.

"at" lets one execute a command at a specific date and time in the future. there are quite a few options.

zenity is a package that provides and easy way to pop-up a custom dialog box. there are quite a few options for zenity as well.


open a terminal, for an event at 9:00am on October 29 enter the following:

at 0900 Oct 29

a "at>" prompt will appear. enter the command to execute:

at> env DISPLAY=:0.0 zenity --info --title "my title" --text "my custom message"

when finished with the command hit the enter key, then press CTRL-D. a job number with date and time for the job will appear.

specify the display device to use for the zenity dialog
env DISPLAY=:0.0

specify a zenity info dialog box
--info

specify the zenity dialog box title
--title "my title"

specify the zenity dialog box message text
--text "my custom message"


info take from:

man page for at command
man page for X
http://www.brunolinux.com/02-The_Terminal/The_at_Command.html
http://lowfatlinux.com/linux-task-scheduler-at.html?ModPagespeed=noscript
http://linux-commands-examples.com/zenity
http://ubuntuforums.org/showthread.php?t=759389&page=2
https://help.ubuntu.com/community/CronHowto
http://www.linuxquestions.org/questions/linux-newbie-8/export-display%3D-0-0-a-682926/