You are not logged in.
So, I want to have a menu entry in Openbox which locks my screen and suspends my laptop:
<item label="Suspend">
<action name="Execute">
<command>
slock; dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
</command>
</action>
</item>
Only instead of running slock and then the suspend command, as BASH would if presented with this, it does nothing at all. How do I make it do both?
Offline
would it not be better to make a small script and fire that....?
Mr Green
Offline
Yes, openbox can't execute bash scripts like that. You should either use it as arguments to sh, like so:
sh -c 'slock; dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0'
Or, like Mr Green said, make your own script somewhere and execute that (I prefer this way)
Last edited by moljac024 (2008-11-27 15:39:33)
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Alright, thanks.
Offline