xdg-screensaver — command line tool for controlling the screensaver
xdg-screensaver
suspend
WindowID
xdg-screensaver
restore
WindowID
xdg-screensaver
{ activate
| reset
| status
}
xdg-screensaver
{ --help
| --manual
| --version
}
xdg-screensaver provides commands to control the screensaver.
xdg-screensaver is for use inside a desktop session only. It is not recommended to use xdg-screensaver as root.
suspend WindowID
Suspends the screensaver and monitor power management.
WindowID
must be the X Window ID
of an existing window of the calling application. The window
must remain in existance for the duration of the suspension.
The screensaver can be suspended in relation to multiple windows at the same time. In that case screensaver operation is only restored once the suspensions have been restored in relation to each of the windows
resume WindowID
WindowID
must be the same X Window ID that was passed to a previous call
of xdg-screensaver suspend
activate
reset
status
--help
--manual
--version
An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned:
1
2
3
4
xdg-screensaver suspend 0x1c00007
Causes the screensaver to be disabled till xdg-screensaver resume 0x1c00007 is called. 0x1c00007 must be the X Window ID of an existing window.
There is no provision for cancelling a suspend operation. If a second suspend is started before the first one is completed, then the screensaver will be restored to its original state before the second suspend is able to complete.
For example, if a presenter completes her presentation, and a second presenter starts before the delay is over, then the screensaver could come on during the second presentation.
True suspend functionality will require cooperation from the X server. The Xorg group has implemented an extension that allows an application to disable the screensaver while it is connected, which will re-enable the screensaver. xdg-screensaver should be updated to take advantage of this functionality when it is available.