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, in Red Hat Enterprise Linux 7. 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 functions of particular buttons with dconf.
This section shows how to configure the system to shutdown after pressing the power 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
[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
/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:
- Users must 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
- shows a pop-up query asking the user what to do
- hibernates the system
- terminates the session and logs the user out
- does nothing
- starts a standard shutdown procedure
- suspends the system