1
The GNOME Screensaver DBUS API
2
------------------------------
4
This API is currently unstable and is likely to change in the future.
6
GNOME Screensaver exposes a DBUS API for programs to obtain
7
information about the screensaver state and to interact with
8
the screensaver in limited ways.
10
The following constants are used to uniquely refer to the
11
GnomeScreensaver object when making DBUS method calls:
13
DBUS Service: "org.gnome.screensaver"
14
DBUS Object Path: "/org/gnome/screensaver"
15
DBUS Interface: "org.gnome.screensaver"
23
Description: Request that the screen be locked
28
Description: Request that the screen saver theme be restarted
29
and if applicable switch to the next one in the list.
33
Returns: DBUS_TYPE_BOOLEAN
34
Descriptions: Returns the value of the current state of idleness,
35
TRUE if the session is idle, FALSE if not.
39
Returns: DBUS_TYPE_UINT32
40
Descriptions: Returns the number of seconds that the session has
41
been idle. Returns zero if the session is not idle.
43
Name: InhibitActivation
44
Args: DBUS_TYPE_STRING reason
45
reason: Description of the reason why saving the screen
48
Description: Request the saving the screen due to system idleness
49
be blocked until AllowActivation is called or the
50
calling process exits.
55
Description: Cancel any previous call to InhibitActivation() by the
59
Args: DBUS_TYPE_BOOLEAN state
60
state: TRUE to request activation,
61
FALSE to request deactivation
63
Description: Request a change in the state of the screensaver.
64
Set to TRUE to request that the screensaver activate.
65
Active means that the screensaver has blanked the
66
screen and may run a graphical theme. This does
67
not necessary mean that the screen is locked.
71
Returns: DBUS_TYPE_BOOLEAN
72
Descriptions: Returns the value of the current state of activity.
75
Name: setThrottleEnabled
76
Args: DBUS_TYPE_BOOLEAN state
77
state: TRUE to request activation,
78
FALSE to request deactivation
80
Description: Request a change in the state of the theme throttle.
81
Set to TRUE to request that the screensaver not run
82
themes while the screensaver is active.
84
Name: getThrottleEnabled
86
Returns: DBUS_TYPE_BOOLEAN
87
Descriptions: Returns the value of the current throttle state
88
See setThrottleEnabled().
95
Args: DBUS_TYPE_BOOLEAN state
96
Returns: Returns the value of the current state of activity.
97
Description: See method getActive().
99
Name: ThrottleEnabledChanged
100
Args: DBUS_TYPE_BOOLEAN state
101
Returns: Returns the value of the current throttle state.
102
Description: See method getThrottleEnabled().
108
You can get the idle time by running the following:
110
dbus-send --session \
111
--dest=org.gnome.screensaver \
114
--reply-timeout=20000 \
115
/org/gnome/screensaver \
116
org.gnome.screensaver.getIdleTime