LinuxCommandLibrary

gnome-screensaver-command

Control the GNOME screen saver

SYNOPSIS

gnome-screensaver-command [OPTIONS]

PARAMETERS

-a, --activate
    Activates the screen saver immediately.

-d, --disable
    Temporarily disables the screen saver. It requires an argument specifying how long the screensaver should be disabled for.

-e, --enable
    Re-enables the screen saver, undoing a previous disable.

-i, --inhibit
    Inhibits the screensaver from activating.

-q, --query
    Queries the status of the screen saver and returns an exit code indicating whether it is active.

-t, --time
    Prints the screen saver idle time in seconds.

-l, --lock
    Locks the screen immediately.

-v, --version
    Displays the version information.

-h, --help
    Displays a help message.

DESCRIPTION

The gnome-screensaver-command command is a utility for controlling the GNOME screen saver. It allows users to activate, deactivate, query the status, and otherwise interact with the screen saver process. It primarily communicates with the gnome-screensaver daemon. This command provides a simple interface for locking the screen, activating the screen saver to blank the display, and checking if the screen saver is currently active. It's particularly useful in scripts or custom keyboard shortcuts to quickly lock the screen or prevent the screen saver from activating during a presentation. The command's function is tightly coupled with the GNOME desktop environment and the availability of the gnome-screensaver daemon.

EXIT STATUS

The gnome-screensaver-command command returns an exit code of 0 if successful. When querying the status using -q, it returns 0 if the screen saver is active and 1 if it is inactive.
Other errors will return a non-zero exit status.

SEE ALSO

gnome-screensaver(1), xlock(1), xscreensaver(1)

Copied to clipboard