<div dir="ltr">Nice...<br><b>dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop</b><div><div>works here... Post here if you find out how to request suspend and hibernate... I'm not intending to use it, but It is good to see every single key on your machine actually working...</div>
<div><br></div><div>By the way, I could make the power button to shutdown immediately setting up xfce4-power-manager on previus Lubuntu versions... did not try this on 13.10 and 14.04...</div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-04-30 18:45 GMT-03:00 John Hupp <span dir="ltr"><<a href="mailto:lubuntu@prpcompany.com" target="_blank">lubuntu@prpcompany.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Nice find.<br>
<br>
Recent travels brought me to <a href="http://askubuntu.com/questions/339842/xubuntu-hotkey-for-immediate-shutdown" target="_blank">http://askubuntu.com/questions/339842/xubuntu-hotkey-for-immediate-shutdown</a>,
because I was looking for xfce commands to do the job, but it also
has this dbus-send command, which I just used to shut down a
machine without root privileges:<br>
<br>
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit
/org/freedesktop/ConsoleKit/Manager
org.freedesktop.ConsoleKit.Manager.Stop<br>
<br>
That page has also has desirable-looking xfce4-session-logout
commands (everything we would want), but they rely on a package
not installed on Lubuntu, and lxsession-logout does not yet
support any parallel options.<br>
<br>
Needless to say, on account of the success with the dbus-send
shutdown command, I am now looking hard at dbus-send: <a href="http://manpages.ubuntu.com/manpages/trusty/man1/dbus-send.1.html" target="_blank">http://manpages.ubuntu.com/manpages/trusty/man1/dbus-send.1.html</a><div>
<div class="h5"><br>
<br>
On 4/30/2014 5:14 PM, Andre Rodovalho wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr"><a href="http://sourcecodebrowser.com/lxsession/0.4.3/lxsession-logout_8c.html" target="_blank">http://sourcecodebrowser.com/lxsession/0.4.3/lxsession-logout_8c.html</a><br>
<br>
<b>dbus</b> seems to have control... I have no idea on how can
you control dbus, but my guess it you will need root...</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-04-30 17:55 GMT-03:00 Andre
Rodovalho <span dir="ltr"><<a href="mailto:andre.rodovalho@gmail.com" target="_blank">andre.rodovalho@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I know <b>lxsession-logout</b> gives us that
logout window which hibernate, suspend and others are
available... I tried to insert some commands but I had no
luck. Maybe you can search this lxssession-logout
documentation or it's source code...
<div>
<br>
</div>
<div><b>lxsession-default quit</b> triggers to
lxsession-logout...<br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-04-30 17:11 GMT-03:00 John
Hupp <span dir="ltr"><<a href="mailto:lubuntu@prpcompany.com" target="_blank">lubuntu@prpcompany.com</a>></span>:
<div>
<div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>One problem solved: If I use "nmcli nm wifi
on" and "nmcli nm wifi off" instead of the
rfkill commands, this toggles the wifi radio
without root permissions.<br>
<br>
Now if I could find some suspend/standby and
hibernate commands that don't require root
permission, this job would be done!
<div>
<div><br>
<br>
On 4/30/2014 3:30 PM, John Hupp wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">
<div>I spoke too soon. All the programs
(rfkill, pm-suspend, pm-hibernate) must
run as root, and nothing I have tried so
far has allowed these keys to work as I
intend.<br>
<br>
I created
/home/<user>/.config/openbox/toggle-wifi.sh
with this content:<br>
<br>
#!/bin/bash<br>
<br>
if [ $(rfkill list wifi | grep "Soft
blocked: yes" | wc -l) -eq 1 ] ; then<br>
rfkill unblock wifi<br>
zenity --info --text "Enabled
wireless"<br>
else<br>
rfkill block wifi<br>
zenity --info --text "Disabled
wireless"<br>
fi<br>
<br>
And then:<br>
<br>
chown root:root toggle-wifi.sh<br>
chmod 4755 toggle-wifi.sh<br>
<br>
I also tried inserting 'sudo command' in
front of the rfkill commands in
toggle-wifi.sh, and I tried 'sudo
command toggle-wifi.sh' in the
lubuntu-rc.xml command statement.<br>
<br>
On 4/30/2014 1:09 PM, John Hupp wrote:<br>
</div>
<blockquote type="cite">
<div>After thinking about it, I used an
Upstart job to do what the
MultiMediaKeys article instructed to
be done with bootmisc.sh or rc.local.
<br>
<br>
Though I'm no better than an Upstart
hacker, especially with regard to
choice of a 'start on' event, I
created
/etc/init/kb-keys-customize.conf with
this content:<br>
<br>
# kb-keys-customize<br>
#<br>
# Map key codes to the scan codes
emitted by Fn-F4, Fn-F5, Fn-F12<br>
<br>
description "Map Fn-F4, Fn-F5 and
Fn-F12 kernel scancodes to kernel
keycodes"<br>
author "John Hupp"<br>
<br>
start on local-filesystems<br>
<br>
script<br>
setkeycodes e017 128 e016 129 e018
130<br>
end script<br>
<br>
After rebooting, I found that 'xev
-event keyboard' now reports that
Fn-F4, Fn-F5 and Fn-F12 are mapped to
X keysyms Cancel, Redo and SunProps,
so I expect that I should be able to
bind those keys in lubuntu-rc.xml to
Andre's suggested commands.<br>
<br>
On 4/29/2014 6:08 PM, John Hupp wrote:<br>
</div>
<blockquote type="cite">
<div>The next problem is that Fn-F4
and Fn-F5 don't generate any
keysyms, so they can't be bound to
the commands suggested by Andre.<br>
<br>
To deal with that, I've been
following the In-Depth Instructions
in <a href="https://help.ubuntu.com/community/MultimediaKeys" target="_blank">https://help.ubuntu.com/community/MultimediaKeys</a>,
and I have identified the scancodes
and picked a couple unassigned
kernel keycodes, but that article is
old, and writing setkeycodes
commands into
/etc/init.d/bootmisc.sh or
/etc/rc.local seems deprecated
(those files don't exist).<br>
<br>
Is there more current documentation
for this task? Is ibus-setup
supposed to handle this job somehow
under Lubuntu 14.04? Or is there
another place preferred for
auto-starting setkeycodes commands?<br>
<br>
On 4/29/2014 3:54 PM, John Hupp
wrote:<br>
</div>
<blockquote type="cite">
<div>Thanks, Andre, for all of those
great tips.<br>
<br>
I've been looking at the Exec
lines in several versions of
~/.config/autostart/LXRandR-autostart.desktop
(created when one clicks Save in
LXRandR) and thinking about how I
could create something that would
cause Fn-F7 to toggle through the
LVDS, VGA and S-Video outputs, but
your approach -- simply binding to
LXRandR -- is a MUCH better idea!<br>
<br>
And if I wanted to add the ability
to extend the desktop instead of
mirroring it, I could install
arandr and just bind to that
instead.<br>
<br>
On 4/29/2014 3:18 PM, Andre
Rodovalho wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I tested here, and
it works: <a href="http://askubuntu.com/questions/181390/what-is-the-command-for-sleep-hibernate" target="_blank">http://askubuntu.com/questions/181390/what-is-the-command-for-sleep-hibernate</a><br>
<br>
<code><b>pm-suspend</b> and<b> </b></code><code><b>pm-hibernate</b></code><br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2014-04-29
16:13 GMT-03:00 Andre
Rodovalho <span dir="ltr"><<a href="mailto:andre.rodovalho@gmail.com" target="_blank">andre.rodovalho@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">On <span style="font-family:arial,sans-serif;font-size:13px">lubuntu-rc.xml
I do:</span>
<div><br>
</div>
<div>
<div><keybind
key="XF86Display"></div>
<div> <action
name="Execute"></div>
<div>
<command>lxrandr</command></div>
<div>
</action></div>
<div>
</keybind><br>
<br>
<b>lxrandr</b> deals
with additional
monitors, you just
enable them an apply.<br>
</div>
</div>
<div> <br>
</div>
<div>I'm not sure what
commands you can execute
to sleep and hibernate,
but you can control
radio with <b>rfkill</b>.
I'm not sure if those
commands really require
root access, but on that
case you can do a: <b>gksu
command</b></div>
<div><b><br>
</b></div>
<div>Hope that helps! To
test the shortcuts
without restarting all
the system you can
restart only openbox: <b>openbox
--restart</b></div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">
2014-04-28 22:03
GMT-03:00 Israel <span dir="ltr"><<a href="mailto:israeldahl@gmail.com" target="_blank">israeldahl@gmail.com</a>></span>:
<div>
<div><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 04/28/2014
07:48 PM, John
Hupp wrote:<br>
> I was
trying to watch
Netflix on a
laptop (with
Lubuntu)
connected to<br>
> a TV by
S-Video
connection. I
found out that
Fn-F7 was not
working to<br>
> select the
external VGA or
S-Video
displays.<br>
><br>
>
Subsequently I
found that Fn-F4
does not put the
laptop to sleep,
and<br>
> Fn-F5 does
not toggle the
WiFi radio
on/off. (The
other common<br>
> special
keys work OK.)<br>
><br>
> So I'm
trying to get
those keys
working that way
via entries in<br>
>
lubuntu-rc.xml.<br>
><br>
> With 'xev
-event keyboard'
I found out that
Fn-F7 produces
the keysym<br>
>
'XF86Display'
but I still need
to know what
command to bind
that to.<br>
> So that's
my first
question.<br>
><br>
> Fn-F4 and
Fn-F5 does not
produce any
keysym's, so I'm
currently at a<br>
> loss for
how to proceed
next with those.<br>
><br>
><br>
</div>
Hi,<br>
<br>
you can use arandr
to make a shell
script to switch
the display to a<br>
certain mode.
Plug in the
monitor and use
arandr to make a
setup you<br>
want, and save
that. Then open
your config file
for openbox and
set<br>
the keyboard
shortcut for your
display key (i.e.
XF86Display)<br>
to execute the<br>
<command><br>
/bin/bash
/path/to/scriptname.sh<br>
</command><br>
while
scriptname.sh is
whatever you saved
the setup as with
the correct<br>
path.<br>
<br>
arandr is a
front-end for
xrandr. So the
script is actually
using<br>
xrandr to modify
your display
settings.<br>
<br>
I hope this helps.<br>
<span><font color="#888888"><br>
--<br>
Regards<br>
</font></span>
<div>
<div><br>
<br>
--<br>
Lubuntu-users
mailing list<br>
<a href="mailto:Lubuntu-users@lists.ubuntu.com" target="_blank">Lubuntu-users@lists.ubuntu.com</a><br>
Modify
settings or
unsubscribe
at: <a href="https://lists.ubuntu.com/mailman/listinfo/lubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/lubuntu-users</a><br>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
</blockquote>
<br>
</div>
</div>
</div>
<br>
--<br>
Lubuntu-users mailing list<br>
<a href="mailto:Lubuntu-users@lists.ubuntu.com" target="_blank">Lubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/lubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/lubuntu-users</a><br>
<br>
</blockquote>
</div>
</div>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>