Disable reboot when ctrl-alt-del is pressed
This document (7023999) is provided subject to the disclaimer at the end of this document.
SUSE:/home/SUSE/ # ls -lah /usr/lib/systemd/system/ctrl-alt-del.target lrwxrwxrwx 1 root root 13 Jul 11 09:12 /usr/lib/systemd/system/ctrl-alt-del.target -> reboot.target
In gnome, we see that ctrl-alt-delete points to a logout plugin:
SUSE:/home/SUSE/ # gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys org.gnome.settings-daemon.plugins.media-keys logout '<Control><Alt>Delete'
To change the reboot behavior to no longer reboot in a tty on ctrl-alt-del, point the symlink to /dev/null instead and the key combination will no longer reboot the system:
ln -sf /dev/null /usr/lib/systemd/system/ctrl-alt-del.target
Now check to ensure the symlink has been updated as expected:
SUSE:/home/SUSE/ # ls -lah /usr/lib/systemd/system/ctrl-alt-del.target lrwxrwxrwx 1 root root 9 Jul 11 09:23 /usr/lib/systemd/system/ctrl-alt-del.target -> /dev/null You have new mail in /var/spool/mail/logan
Ctrl-alt-del reboot has now been disabled. Test ctrl-alt-del to verify.
To change this behavior to no longer reboot in gnome on ctrl-alt-del, change the value for the logout key to something else. In the following example, it will be changed to ctrl-alt-shift-del requiring shift to be pressed as well.
Run the following logged into gnome for the user you wish to change:
gsettings set org.gnome.settings-daemon.plugins.media-keys logout '<Control><Alt><Shift>Delete'
Now test ctrl-alt-del.
This will need to be run for each existing or new user which you wish to change the ctrl-alt-del behavior for.
This is not ideal, as a disadvantage of this is that this can be overwritten by the user too..)
When it is desirable to disable the ctrl-alt-del behavior globally and for all users, follow the following procedure :
Create /etc/dconf/profile/user file with the following content :
Create /etc/dconf/db/local.d/01-local file with the following content :
Lock the logout property by creating /etc/dconf/db/local.d/locks/media-keys file with the following content :
Next save and update the dconf database :
This procedure has been detailed in TID 000019048 - Define global customer keybindings for shutdown
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:7023999
- Creation Date: 11-Jul-2019
- Modified Date:11-Feb-2021
- SUSE Linux Enterprise Desktop
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com