You are not logged in.
I'm trying to setup a keyboard shortcut to quickly shutdown crunchbang.
The combo I want is Ctrl-Super-S. I added the following to rc.xml, so it looks like:
<keybind key="W-A-Right">
<action name="Execute">
<command>cb-aerosnap --right</command>
</action>
</keybind>
<!-- Joel's custom key bindings -->
<keybind key="C-W-s">
<action name="Execute">
<command>'/usr/bin/sudo /sbin/shutdown -h now'</command>
</action>
</keybind>
</keyboard>When I press the combo, I get a popup, stating "Openbox: Failed to execute child process '/usr/bin/sudo /sbin/shutdown -h now' (No such file or directory). I've already given permissions in sudo, to my username, to shutdown without a password. Invoking the same command from a terminal works fine.
What seems to be the mistake?
Last edited by joelgm (2013-11-21 15:46:35)
Offline
Isn't the command just this?
sudo shutdown -h nowNo need to go to the /sbin or /usr/bin directory at all
Offline
Isn't the command just this?
sudo shutdown -h nowNo need to go to the /sbin or /usr/bin directory at all
That was the first format I tried. It had the same error message. I tried solving it by using the full path (as required by cron).
Offline
Ah. Could try this:
gksudo shutdown -h now(gksudo displays a graphical password input box, instead of opening a terminal)
or
terminator --command="sudo shutdown -h now"Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.