Disable shutdown confirmation ubuntu 20.04

How to disable the shutdown dialogues in ubuntu 20.04?

Ask Ubuntu Asked by user753441 on December 29, 2020

2 Answers

2 Answers

You can disable the shutdown and logout dialogs by running:

gsettings set org.gnome.SessionManager logout-prompt false

Note that with this setting your computer will be immediately shut down when you press Power Off..., so you won't be able to use Power Off... to reboot. You can, however, run reboot in a terminal to reboot your computer.

To revert the setting run:

gsettings set org.gnome.SessionManager logout-prompt true

Correct answer by BeastOfCaerbannog on December 29, 2020

The shutdown dialog confirmation is provided by the tool gnome-session-quit. The tool does not allow to disable the confirmation for shutdown or restart operations. So there is no easy way to disable the confirmation dialog when you shut down via the user menu, or the "Power off" launcher in the dash.

The terminal commands poweroff or shutdown are configured in Ubuntu 20.04 to be available by normal users. Thus, you could bind one of these commands to a shortcut key, or create a launcher to that command to obtain a quicker way for shutting down the system.

Once you do that, you will realize that you should make sure that shutting down the system is not too easily triggered as to avoid unintended shutdowns.

Answered by vanadium on December 29, 2020

Add your own answers!

Related Questions

What’s the easiest way to install OpenSSH 7.4 on Ubuntu 16.04?

2  Asked on November 6, 2021 by tri-nguyen


Xmodmap: Assign right ctrl to two keys

1  Asked on November 6, 2021 by unloco


Two sent folders in Thunderbird

1  Asked on November 6, 2021 by brett-stevens


Invalid desktop entry file error – midi2input

2  Asked on November 6, 2021 by cobweb


script file command not found

1  Asked on November 6, 2021 by mohsen_m


Simple Task Manager like Windows Fewer Details Mode

0  Asked on November 6, 2021 by jackson-eyton


Drevo calibur V2 Super key

1  Asked on November 6, 2021 by guillaumea


2 version of Cmake, needs to remove one

1  Asked on November 6, 2021 by roy-raihenshtein


Wifi not working on Lubuntu 20.04

1  Asked on November 6, 2021 by international_bean


Behringer C-1 Drivers

0  Asked on November 6, 2021 by lavta


Ubuntu 20.04 upgrade getting stuck with fsck check

0  Asked on November 1, 2021 by m-go


Ask a Question

Get help from others!

© 2022 All rights reserved.