twbCurrently "shutdown -r 10" will send a whole bunch of useful wall(8)-like messages to users on ttys.05:06
twbBut users on a GUI aren't notified.  I need to fix this.05:06
twbIs there an alternative to dpkg-diverting /sbin/shutdown and adding a horrible wrapper there?05:07
twbI 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:10
sadmactwb: that's close to the right thing...05:47
sadmacnot that I can improve it.05:47
twbAFAICT 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:49
twbThere'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:51
sadmactwb: 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
twbshutdown(8) doesn't send a dbus signal05:52
twbNot 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 work05:53
twbThis is basically for workstations that have a curfew, so they automatically shutdown at e.g. 9PM each night.05:54
sadmactwb: you should use shutdown -r now from some other script then05:55
twbYou mean, from a wrapper script that uses e.g. zenity to manually warn the user in advance?05:55
twbThat is plan B, because it's bloody awful.06:00
twbI mean, the script would have to find the user's XAUTHORITY file and DISPLAY and then use them to break into the user's GUI06:00
twb(Because the script runs as root.)06:00
twbsadmac: sweet, /usr/share/doc/python-notify/examples/test-basic.py gets nearly half the problem solved06:06
sadmacinteresting... libnotify doesn't have a system-wide notice thingy.06:09
twbYeah, 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:11
twbSo apparently that clever plan has gone to shit because /var/run/utmp isn't writable by users.07:19
twbOr: setgid utmp the python script...07:22
mgoetzeeh... i'm having a problem with upstart 0.3.9 ... i created /etc/event.d/pleskinstall but i get "status: Unknown job: pleskinstall"11:47
=== robbiew1 is now known as robbiew
=== robbiew1 is now known as robbiew

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!