Skip to content

logind

Type definitions for logind.conf — the systemd-logind (login manager) configuration file.

import type { LogindConf, LogindHandleAction } from '@sysopkit/linux/systemd/logind';
type LogindHandleAction =
| 'ignore'
| 'poweroff'
| 'reboot'
| 'halt'
| 'kexec'
| 'suspend'
| 'hibernate'
| 'hybrid-sleep'
| 'suspend-then-hibernate'
| 'sleep'
| 'lock'
| 'factory-reset';
type LogindConf = {
Login: {
NAutoVTs?: number;
ReserveVT?: number;
KillUserProcesses?: 'yes' | 'no';
KillOnlyUsers?: string;
KillExcludeUsers?: string;
IdleAction?: LogindHandleAction;
IdleActionSec?: number;
InhibitDelayMaxSec?: number;
UserStopDelaySec?: number | 'infinity';
HandlePowerKey?: LogindHandleAction;
HandlePowerKeyLongPress?: LogindHandleAction;
HandleRebootKey?: LogindHandleAction;
HandleRebootKeyLongPress?: LogindHandleAction;
HandleSuspendKey?: LogindHandleAction;
HandleSuspendKeyLongPress?: LogindHandleAction;
HandleHibernateKey?: LogindHandleAction;
HandleHibernateKeyLongPress?: LogindHandleAction;
HandleLidSwitch?: LogindHandleAction;
HandleLidSwitchExternalPower?: LogindHandleAction;
HandleLidSwitchDocked?: LogindHandleAction;
PowerKeyIgnoreInhibited?: 'yes' | 'no';
SuspendKeyIgnoreInhibited?: 'yes' | 'no';
HibernateKeyIgnoreInhibited?: 'yes' | 'no';
LidSwitchIgnoreInhibited?: 'yes' | 'no';
RebootKeyIgnoreInhibited?: 'yes' | 'no';
HoldoffTimeoutSec?: number;
RuntimeDirectorySize?: string;
RuntimeDirectoryInodesMax?: number | string;
InhibitorsMax?: number;
SessionsMax?: number;
RemoveIPC?: 'yes' | 'no';
StopIdleSessionSec?: number | 'infinity';
};
};
OptionDescription
NAutoVTsNumber of virtual terminals to allocate for autovt services (default: 6).
KillUserProcessesKill user processes when user logs out completely.
HandleLidSwitchAction when laptop lid is closed.
HandlePowerKeyAction when power button is pressed.
HandleSuspendKey / HandleHibernateKeyAction for sleep keys.
InhibitDelayMaxSecMaximum delay for inhibitor locks before shutdown/sleep.
RemoveIPCRemove SysV/POSIX IPC objects when user logs out (default: yes).