Tuesday, October 28, 2014

How to add restart action in indicator-session menu in Unity

You've probably noticed that there is no restart action in indicator-session menu in Unity, by default. There are  shutdown and logout actions. Button for runing the indicator is placed in top right corner of Your screen, or far right on Unity panel.

By default, when You run shutdown action from the menu, it'll ask You to restart or shutdown Your system. To prevent this, You can add restart action in the menu. After that, when You click on an action, appropriate function will run immediately, without the question.













This can be achieved through GUI or CLI. The first method requires dconf-editor installed. After installation, run the app and navigate to:

apps->indicator-session->suppress-logout-restart-shutdown

and check the box.











Or, You can type this in terminal:

gsettings set com.canonical.indicator.session suppress-logout-restart-shutdown "true"