How to turn off the Shutdown, Restart, Lock & Suspend confirmation dialog box in Ubuntu. Terminal commands to remove Shut Down & Restart confirmation dialog box in Ubuntu 15.04 and Ubuntu 14.04. You can easily disable the shutdown, restart and logout confirmation box in Ubuntu 15.04 and Ubuntu 14.04.
By default, Ubuntu 15.04 and Ubuntu 14.04 is configured to always prompt you with a dialog box when you wish to shutdown, restart or logout from your current session. This prevents you from mistakenly shutting down or restarting your Ubuntu 15.04 and Ubuntu 14.04 PC.
Luckily, you can disable the confirmation dialog box to appear everytime you select to shutdown, restart and logout Ubuntu 15.04 and Ubuntu 14.04.
Disable shutdown confirmation dialog box in Ubuntu 15.04 and Ubuntu 14.04
Note: When you disable the shutdown/restart confirmation dialog box, it also disable the log out/lock confirmation dialog box.
Disable shutdown confirmation dialog box in Ubuntu 15.04 and Ubuntu 14.04
To disable shutdown dialog box, open a Terminal (Ctrl+Alt+T) and use the following command:
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true
After executing the above command there is no need of a system restart. Next time when you click on shutdown, it will immediately shut down the system without asking for your confirmation.
Enable shutdown confirmation dialog box in Ubuntu 15.04 and Ubuntu 14.04
To enable the confirmation dialog box again, open a Terminal and type the following command:
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown false