Questo contenuto non è disponibile nella lingua selezionata.

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

  1. Create a local database for system-wide settings in the/etc/dconf/db/local.d/01-power file:
    [org/gnome/settings-daemon/plugins/power]
    power-button-action='interactive'
    
    Copy to Clipboard Toggle word wrap
  2. Override the user's setting and prevent the user from changing it in the /etc/dconf/db/local.d/locks/01-power file:
    /org/gnome/settings-daemon/plugins/power/power-button-action
    
    Copy to Clipboard Toggle word wrap
  3. Update the system databases:
    # dconf update
    Copy to Clipboard Toggle word wrap
  4. 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

nothing
does nothing
suspend
suspends the system
hibernate
hibernates the system
interactive
shows a pop-up query asking the user what to do
With 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.2. Pop-up query for interactive mode

Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat