Control KDM from FVWM


Maybe you know and like the feature in KDE that enables one to logout and reboot or halt the system in one step. Together with the auto-login feature of KDM (KDE Display Manager) this is very convenient for home systems.

FVWM does not provide built-in functionality for this. It includes example configurations where the command shutdown is used. But you need root-permissions for this approach.


However a clean solution is very simple with the command kdmctl which allows to control KDM.

Here is the required part of the FVWM config file:

AddToMenu "Quit" + "Quit" Title + "Logout" Quit + "" Nop + "Reboot" Function "Reboot" + "Halt" Function "Halt" AddToFunc "Reboot" + I Exec kdmctl shutdown reboot trynow + I Schedule 1000 Quit AddToFunc "Halt" + I Exec kdmctl shutdown halt trynow + I Schedule 1000 Quit

The Schedule command is likely not required since kdmctl is a pure command-line tool and thus fast as lightning unlike most other KDE programs.

In combination with FvwmM4 it is even possible to use kdmctl to check if the user is allowed to shutdown the system and only add the menu-entries in that case.


Last modified 9th April 2007 Copyright (©) 2006 - 2007 by Arvin Schnell

Valid XHTML and CSS