With some (arch-based) distros setting up a shut down hotkey combo is as simple as adding a custom shortcut for poweroff or shutdown now from system settings, but I've been scratching my head about how to achieve this with Obarun (under regular user). Some advice please?
maybe at zsh or bash profile or maybe with specific hotkeys definition with your desktop environment...
you have a wrapper /usr/bin/shutdown which simply call the 66-shutdown tool
This answer is a bit above my paygrade. I would appreciate more clarification!
give please examples of what you want to try to accomplish.
What do you use as DE?
Sure. I'm on latest Plasma and want to be able to shut down without confirmation using a key combo such as Meta-Shift-Q, for example.
i'll just butt in with this:
dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
might work for you ..
i've just been using `sudo poweroff` (obviously with sudo nopassword rights) .. but now thinking about it, i should probly be using the `/usr/bin/shutdown -p now` to shutdown correctly :p
and hence that dbus/consolekit approach above might not be the correct way even it does work..
ncmprhnsbl wrote
dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
It works! Thanks a ton.

It's a little weird how reboot and log off shortcuts can be set without hassle but shutdown requires its own workaround.

Powered by Obarun