Comment 6 for bug 23693

Revision history for this message
John K. Hohm (jhohm-acm) wrote : Here is a small script you can run in the background to set an away message when the Gnome screensaver activates.

#!/usr/bin/python

import os, dbus, gobject, dbus.glib

bus = dbus.SessionBus()

def onSessionIdleChanged(state):
    if state:
        os.system("gaim-remote 'setstatus?status=away&message=Session idle'")
    else:
        os.system("gaim-remote 'setstatus?status=available&message='")

bus.add_signal_receiver(onSessionIdleChanged, 'SessionIdleChanged', 'org.gnome.ScreenSaver')

gobject.MainLoop().run()