LinuxCommandLibrary

cinnamon-screensaver-command

Control the Cinnamon desktop screen saver

SYNOPSIS

cinnamon-screensaver-command [-h|--help] [-v|--version] [-a|--activate] [-d|--deactivate] [-l|--lock] [-p|--poke]

PARAMETERS

-h, --help
    Display usage information and exit

-v, --version
    Print version information and exit

-a, --activate
    Activate the screensaver immediately

-d, --deactivate
    Deactivate the screensaver

-l, --lock
    Lock the screen (starts screensaver if idle)

-p, --poke
    Simulate user activity to reset screensaver timer

DESCRIPTION

The cinnamon-screensaver-command provides a simple command-line interface to manage the Cinnamon screensaver, part of the Cinnamon desktop environment used in Linux Mint and other distributions.

It allows users to activate, deactivate, lock, or simulate activity on the screensaver without interacting with the graphical interface. This is useful for scripting, keyboard shortcuts, or automation tasks.

For instance, bind it to a hotkey to quickly lock the screen during presentations or remotely via SSH. It interacts with the running Cinnamon session's screensaver daemon, ensuring seamless integration.

Unlike graphical tools, it requires no additional dependencies beyond a standard Cinnamon installation. Output is minimal, typically just success or failure, making it script-friendly.

Key use cases include desktop automation, multi-monitor setups where graphical menus are cumbersome, or headless control in virtual environments supporting Cinnamon.

CAVEATS

Only works in a running Cinnamon session; ineffective in other DEs like GNOME or KDE.
Requires cinnamon-screensaver daemon active. No error output on failure in non-interactive shells.

EXAMPLES

Lock screen: cinnamon-screensaver-command --lock
Activate screensaver: cinnamon-screensaver-command --activate
Reset idle timer: cinnamon-screensaver-command --poke

Script to lock after delay: sleep 5 && cinnamon-screensaver-command --lock

EXIT CODES

Returns 0 on success, 1 on error (e.g., no screensaver running). Silent on invalid options.

HISTORY

Introduced with Cinnamon 1.6 (2012) as part of Linux Mint's Cinnamon DE fork from GNOME Shell. Evolved alongside Cinnamon screensaver, with options stable since Cinnamon 2.0 (2013). Maintained by Linux Mint team for reliability in modern Wayland/X11 hybrids.

SEE ALSO

cinnamon-screensaver(1), xscreensaver-command(1), gnome-screensaver-command(1), xset(1)

Copied to clipboard