Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 810 Bytes
--- pygtk-shutdown 2011-08-22 19:18:04.000000000 -0700
+++ pygtk-shutdown-consolekit 2011-08-22 19:22:30.000000000 -0700
@@ -100,11 +100,11 @@
gtk.main_quit()
def shutdown(self, widget = None, data = None):
- os.system("/usr/bin/gksudo \"/sbin/shutdown -h now\" &")
+ os.system("dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop &")
gtk.main_quit()
def reboot(self, widget = None, data = None):
- os.system("/usr/bin/gksudo \"/sbin/shutdown -r now\" &")
+ os.system("dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart &")
gtk.main_quit()
def main():