2

How can I add a shutdown button to this menu?

In mine it is missing and I am only able to shut down through terminal. My menu only has lock and logout options, and even the logout option doesn't respond when I click it. I want it to appear like this:

shutdown icon in menu

Geek Guy
  • 121

1 Answers1

1

What I had added to all my launchers is a shutdown icon:

enter image description here

When clicked it will call the following dialog:

enter image description here

Save a file named shutdown.desktop in ~/.local/share/applicatons with this content

[Desktop Entry]
Categories=Application;System;
Comment=To shutdown the computer
Encoding=UTF-8
Exec=gnome-session-quit --power-off
Icon=system-shutdown
Name=Shutdown-Button
NoDisplay=false
StartupNotify=false
Terminal=false
Type=Application

To do this, copy all the lines above, open the "Text Editor" (search in Dash) Gedit to paste the text in the still empty page. Then choose File > Save, press CtrlH to show hidden files, browse to .local/share/applications and save as shutdown.desktop:

enter image description here

Then open the file browser Nautilus to again browse to ~/.local/share/applications/ to then right click on the shutdown.desktop file you had just created there.

Click on it with the right mouse button to open the context dropdown menu. Select the last entry Properties. In the following dialog open the Permissions tab to tick on Allow executing file as program:

enter image description here

Watch the icon change to the red shutdown icon. You can then drag this icon to the launcher:

enter image description here

On clicking on this new entry the following shutdown dialog will appear:

enter image description here

To have it turn off after a countdown see the following question: How do I call gnome-session-quit with countdown from Unity?

Takkat
  • 144,580