LinuxCommandLibrary

kde-inhibit

Inhibit KDE power management and screen locking

TLDR

Inhibit power management

$ kde-inhibit --power [command] [command_arguments]
copy

Inhibit screen saver
$ kde-inhibit --screenSaver [command] [command_arguments]
copy

Launch VLC, and inhibit color correction (night mode) while it's running
$ kde-inhibit --colorCorrect [vlc]
copy

SYNOPSIS

kde-inhibit [--reason <reason>] [--application] <command> [<arguments>...]

PARAMETERS

--reason <reason>
    Provides a human-readable reason for the inhibition. This reason is displayed in system notifications and logs, helping users understand why the system isn't sleeping. It should be enclosed in quotes if it contains spaces.

--application
    Treat the specified command as an application. This is important for applications which set idle hints themselves.
Usually not needed.

<command>
    The command to execute. The inhibit will be active while the command is running.

[<arguments>...]
    Arguments passed to the command being executed.

DESCRIPTION

kde-inhibit is a command-line utility used to prevent the KDE Plasma desktop environment from entering sleep mode, dimming the screen, locking the screen, or activating the screensaver. This is useful for tasks like watching videos, performing long-running operations, or giving presentations where you want to ensure the display remains active and unlocked. The command takes an optional reason to explain the inhibition and will automatically release the inhibit when the process ends. It works by using the PowerDevil DBus interface. It's important to note that this tool only works within a KDE Plasma environment and relies on PowerDevil being running. Other desktop environments will ignore this command, and sleep/screen blanking behavior will be determined by their respective settings. Using `kde-inhibit` can prevent system resource reduction, potentially impacting battery life on laptops.
It supports running a command and its arguments, applying the inhibit only while the specified program is running.

RETURN CODES

kde-inhibit returns the exit code of the command it executes. If the command fails to start, kde-inhibit will return a non-zero exit code indicating the error.

DBUS DEPENDENCY

kde-inhibit depends on the D-Bus inter-process communication system for interacting with the PowerDevil service. If D-Bus is not running or PowerDevil is not available, kde-inhibit will not function correctly.

SEE ALSO

xset(1), xscreensaver(1), systemd-inhibit(1)

Copied to clipboard