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 button makes the machine suspend by default, in Red Hat Enterprise Linux 7. This happens both in cases when the user presses the button physically or when pressing a virtual button from a remote console. To achieve a different behavior when pressing the button, set the functions of particular buttons with dconf.
This section shows how to configure the system to shutdown after pressing the button, which corresponds to the behavior present in Red Hat Enterprise Linux 6.
Procedure 13.11. Setting the behavior when pressing various buttons
- Create a
localdatabase for system-wide settings in the/etc/dconf/db/local.d/01-powerfile:[org/gnome/settings-daemon/plugins/power] button-sleep='nothing' button-suspend='nothing' button-hibernate='nothing' button-power='shutdown'
- Override the user's setting and prevent the user from changing it in the
/etc/dconf/db/local.d/locks/01-powerfile:/org/gnome/settings-daemon/plugins/power/button-sleep /org/gnome/settings-daemon/plugins/power/button-suspend /org/gnome/settings-daemon/plugins/power/button-hibernate /org/gnome/settings-daemon/plugins/power/button-power
- Update the system databases:
#dconf update - Users must log out and back in again before the system-wide settings take effect.
This configuration initiates a system shutdown after pressing the button. To configure the system differently, you can set the behavior of particular buttons.
Options for particular buttons
blank- does nothing
interactive- shows a pop-up query asking the user what to do
hibernate- hibernates the system
logout- terminates the session and logs the user out
nothing- does nothing
shutdown- starts a standard shutdown procedure
suspend- suspends the system

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.