We are already aware of the fact that Ubuntu is configured to always prompt you with a confirmation dialog box when you want to shutdown, restart or log out of your account. This is a safeguard to prevent you from accidentally shutting down or restarting your computer.
Not everyone likes the confirmation dialog box to appear everytime when he/she wants to turn off Ubuntu. People in a hurry may just select the shut down option and forget answering the confirmation dialog box thereby risking their computer running till they return. To overcome such situations you need to disable this dialog box.
Note: Disabling the Shut Down/Restart confirmation dialog box also disable the Log Out/Lock confirmation dialog box.
Notice that when the confirmation dialog box is activated, you don’t find the Restart option on th system menu. But when you choose Shut Down, the Restart option appears on the same confirmation box.
Here is a small tutorial on how to deactivate the Shut Down/Restart confirmation dialog box.
Hold the Ctrl-Alt-T keys together on your keyboard to open the terminal. Type the following command at the prompt and press Enter.
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown true
Click the X button in the upper-left corner of the Terminal window to close it.
Now, you’ll never be prompted for the confirmation. Also you can find the Restart button on the system menu. And whichever option you choose, the action happens immediately without confirmation.
gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown false