Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] cron notifications to GUI front end



Jerry Feldman wrote: 
> I have a crontab task to shutdown my system at a specific time each
> evening. Shutdown notifications come to terminal windows that are open.
> However, When I am logged in and using Atom and Glade to work with some
> code, I miss the notification and the system shuts down. What I would like
> to do is to write a small GUI GTK3 task pop up in my face so I can stop the
> shutdown. One possibility is to write a startup task when I log in. So, I
> am looking at ideas.

sudo -u gaf DISPLAY=:0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/gaf/bus \
notify-send 'SYSTEM SHUTDOWN' \
'Gonna shut down the system Real Soon Now'

See if that works for you.

-dsr-



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org