Some users, including me, find the built-in shutdown confirmation dialog a bit of an annoyance. This dialog is designed to prevent accidental shutdowns, but if you're confident in your actions and want to streamline the shutdown process, you can easily disable it. I’ll show you how to do it in two different ways, with
gsettings or with the dconf Editor.
Disable the shutdown confirmation with gsettings
Step 1: Open a Terminal window. You can do this by pressing
Ctrl + Alt + T or by searching for "Terminal" in the Ubuntu Dash.
Step 2: You can disable the Ubuntu shutdown confirmation using a
gsettings command. Open the terminal and enter the following command:
gsettings set org.gnome.SessionManager logout-prompt falsebash
This command instructs the GNOME Session Manager to disable the logout prompt, which includes the shutdown confirmation.
Step 3: To verify that the change has taken effect, you can use the
gsettings command to retrieve the current setting:
gsettings get org.gnome.SessionManager logout-promptbash
If the output is "false," it means the shutdown confirmation is now disabled.
Step 4: With the shutdown confirmation disabled, your system will now shut down without asking for confirmation every time you initiate a shutdown. This also works for Hibernate.
Disable the shutdown confirmation with dconf Editor
Step 1: To begin, open a terminal window by pressing
Ctrl + Alt + T or searching for "Terminal" in the Ubuntu Dash. If you haven't already installed the dconf Editor, you can do so with the following command:
sudo apt-get install dconf-editorbash
Step 2: After installation, open the dconf Editor by searching for "dconf Editor" in the Ubuntu Dash or by running this command in the terminal:
Step 3: Navigate to the Shutdown Confirmation Setting In the dconf Editor, navigate to the following path:
org > gnome > gnome-session > logout-promptbash
Step 4: In the "logout-prompt" section, you'll see a switch for "logout-prompt." By default, it is enabled. To disable the shutdown confirmation, toggle the switch to the "off" position.
While the Ubuntu shutdown confirmation is there to prevent accidental shutdowns, it can be inconvenient for some users. Disabling it using the
gsettings command or the dconf Editor is a straightforward process, as demonstrated in this small guide. Remember that with great power comes great responsibility, and disabling this confirmation means you need to be more cautious when shutting down your system.
Enjoy your streamlined shutdown process!
Photo by John Smit