SUSE Support

Here When You Need Us

Define global custom keybindings for shutdown.

This document (7021882) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Desktop 12

Situation

In forthcoming cases it may be required to create a custom shutdown keybinding globally.

In such a particular case, instead of for example displaying the shutdown prompt which by default shows when using 'Ctrl+Alt+Del', the system will than directly move to a 'Halt' state.

Resolution

1. Create a new user profile for dconf and add values into it
$ vi /etc/dconf/profile/user
user-db:user
system-db:local
2. Create a directory for the  custom keyfiles
$ mkdir -p /etc/dconf/db/local.d
3. Create a custom keyfile, and add the following  values
$ vi /etc/dconf/db/local.d/01-local-example
[org/gnome/settings-daemon/plugins/media-keys]
logout=''
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
name='shutdown'
command='/sbin/shutdown -h now'
binding='<Control><Alt>Delete'
4. Save, and update, the dconf database :
$ dconf update
5. verify the changes in the dconf GUI :
$ dconf-editor

Cause


Additional Information

Explanation of the custom '/etc/dconf/db/local.d/01-local-example' file content :

   [org/gnome/settings-daemon/plugins/media-keys]
   (note **1 : specify the dconf schema path where the values )

   logout='' 
   (note **2 : since 'Ctrl+Alt+Del' is used by default for logout, this needs to be changed to blank)

   custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
   (note **3 : creates a schema path for custom keybinding)

   [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
   (note **4: custom keybinding schema path)

   name='shutdown'
   command='/sbin/shutdown -h now'
   (note **5: use the full path for any commands here)

   binding='<Control><Alt>Delete'

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7021882
  • Creation Date: 28-Sep-2017
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.