Power Off Ubuntu from unity dash

I was thinking that would be cool to shutdown Ubuntu by typing “power off” in the unity dash so I made this .desktop that does just that 😀 (Ubuntu 14.04)

 

/home/$USER/.local/share/applications/whatever.desktop


[Desktop Entry]
Comment=self-made
Terminal=false
Name=PowerOff
Exec=dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true
Type=Application
Icon=gnome-logout

If you want more…

[Desktop Entry]
Comment=self-made
Terminal=false
Name=PowerOff
Exec=dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true
Type=Application
Icon=gnome-logout
X-Ayatana-Desktop-Shortcuts=Shutdown;Reboot;Suspend;Hibernate;
[Shutdown Shortcut Group]
Name=Power Off
Exec=dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.PowerOff" boolean:true
TargetEnvironment=Unity
[Reboot Shortcut Group]
Name=Reboot
Exec=dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Reboot" boolean:true
TargetEnvironment=Unity
[Suspend Shortcut Group]
Name=Suspend
Exec=dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Suspend" boolean:true
TargetEnvironment=Unity
[Hibernate Shortcut Group]
Name=Hibernate
Exec=dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 "org.freedesktop.login1.Manager.Hibernate" boolean:true
TargetEnvironment=Unity

 

Selezione_002