How to turn off and remove the Shutdown/Restart/LogOut confirmation dialog box in Ubuntu. Remove shutdown confirmation box in Ubuntu 15.10, Ubuntu 14.04, Ubuntu 15.04 and Ubuntu 14.10.
By default, Ubuntu 15.10, 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.10, Ubuntu 15.04 and Ubuntu 14.04 PC.
Luckily, you can disable the confirmation dialog box to appear every-time you select to shutdown, restart and logout Ubuntu 15.10, Ubuntu 15.04 and Ubuntu 14.04. Here’s the terminal commands to remove Shut Down & Restart confirmation dialog box in Ubuntu 15.04 and Ubuntu 14.04.
Disable Shutdown Confirmation in Ubuntu
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
Please Note: When you disable the shutdown/restart confirmation dialog box, it also disable the log out/lock confirmation dialog box.
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.
Re-Enable Shutdown Confirmation in Ubuntu
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