[05:06] Currently "shutdown -r 10" will send a whole bunch of useful wall(8)-like messages to users on ttys. [05:06] But users on a GUI aren't notified. I need to fix this. [05:07] Is there an alternative to dpkg-diverting /sbin/shutdown and adding a horrible wrapper there? [05:10] I think the "right" thing is for the shutdown(8) source to be changed to generate notification-daemon events if it detects dbus is running, but that's kinda hard for me to do on my own. [05:47] twb: that's close to the right thing... [05:47] not that I can improve it. [05:49] AFAICT if I don't want to use a wrapper and don't want to HTFS of upstart itself, I need to make a python daemon that starts when the user logs in. It creates a new /dev/pts/N and adds a record in /var/run/[uw]tmp. That means that shutdown(8) will write to it. Then, it relays that information to notification-daemon or something. [05:51] There's a utility called "gshutdown" that seems to be close to what I want, except that it also wants to replace shutdown(8) with itself. [05:52] twb: ugh. creating that python daemon and then having it listen for a custom dbus signal and relay that information is probably a tad closer to right. [05:52] shutdown(8) doesn't send a dbus signal [05:53] Not until the reboot/shutdown actually begins -- I need to notify the user at e.g. 5 and 10 minutes beforehand, so they can save their work [05:54] This is basically for workstations that have a curfew, so they automatically shutdown at e.g. 9PM each night. [05:55] twb: you should use shutdown -r now from some other script then [05:55] You mean, from a wrapper script that uses e.g. zenity to manually warn the user in advance? [05:59] yes [06:00] That is plan B, because it's bloody awful. [06:00] I mean, the script would have to find the user's XAUTHORITY file and DISPLAY and then use them to break into the user's GUI [06:00] (Because the script runs as root.) [06:06] sadmac: sweet, /usr/share/doc/python-notify/examples/test-basic.py gets nearly half the problem solved [06:09] interesting... libnotify doesn't have a system-wide notice thingy. [06:11] Yeah, but I can launch it per-user in /etc/X11/Xsession.d/ as long as I can get it to have a pty, since then shutdown(8) will talk to that pty. [06:12] cool [07:19] So apparently that clever plan has gone to shit because /var/run/utmp isn't writable by users. [07:22] Or: setgid utmp the python script... [11:47] eh... i'm having a problem with upstart 0.3.9 ... i created /etc/event.d/pleskinstall but i get "status: Unknown job: pleskinstall" === robbiew1 is now known as robbiew === robbiew1 is now known as robbiew