Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Last active January 12, 2022 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrroot5/33f7531ec2beece80bac3df8579fbc70 to your computer and use it in GitHub Desktop.
Save mrroot5/33f7531ec2beece80bac3df8579fbc70 to your computer and use it in GitHub Desktop.
Power off button shutdown button. Keywords: ubuntu, power off, shutdown.

Intro

Create a button to shutdown the PC.

  • Create a .desktop file:
vim ~/.local/share/applications/shutdown-for-dock.desktop
  • With this content:
[Desktop Entry]
Name=Shutdown for Dock
Exec=gnome-session-quit --power-off
Comment=Shutdown button for Ubuntu dock
Terminal=false
Type=Application
Icon=system-shutdown

Then search for "Shutdown for Dock" it on "activities" or "applications list" and set as favourite. Done!

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment