Show Table of Contents
13.11. Changing Behavior when Pressing the Power Button in Graphical Target Mode
When the machine is booted to a graphical login screen or user session, hitting the power button makes the machine suspend by default. This happens both in cases when the user presses the power button physically or when pressing a virtual power button from a remote console. To achieve a different behavior when pressing the power button, set the function of this button with dconf.
For example, if you want the system to shutdown after pressing the power button, use the following procedure:
Procedure 13.11. Using dconf to configure the system to shutdown after pressing the power button
- Create a
localdatabase for system-wide settings in the
- Override the user's setting and prevent the user from changing it in the
- Update the system databases:
- Log out and back in again before the system-wide settings take effect.
This configuration initiates a system shutdown after pressing the power button. To configure the system differently, you can set the behavior of particular buttons.
Options for particular buttons
- does nothing
- suspends the system
- hibernates the system
- shows a pop-up query asking the user what to doWith interactive mode, the system powers off automatically after 60 seconds when hitting the power button.However, you can choose a different behavior from the pop-up query as shown in the figure below.
Figure 13.1. Pop-up query for interactive mode