As indicated above, simply execute the command
pkill -9 -f lxsession
Note that examining the source of lxsession-logout
, you will find there are no command line arguments you can pass it to bypass the menu. lxde-logut
is simply a script which runs lxsession-logout
. Since it seems as though you want a very quick way to logout, the pkill
command listed above may require to much typing. Fortunately, there are two things you can do to speed this up and minimize keystrokes/button clicks.
1) Create an alias for the command.
alias quitnow="pkill -9 -f lxsession"
Substitute in whatever unused word you want for quitnow
. Be careful though, you don't want a typo that immediately logs you out of your session.
2) Edit the /usr/bin/lxde-logout
file. As indicated above, it currently just runs lxsession-logout. It also happens to be what is run when you click the logout button on your menu. Thus you can change it to read
#!/bin/sh
pkill -9 -f lxsession
Though I would leave the lxsession-logout
line as a comment so in case you want to restore its original behavior. Note that this results in the potential for logging out on accidental mouse clicks.
3) Create a separate script and add it to the menu.
4) Create a key binding by adding the following to your ~/.config/openbox/lxde-rc.xml
file. I would put this right before the </keyboard>
tag.
<keybind key="C-q">
<action name="Execute">
<command>pkill -9 -f lxsession</command>
</action>
</keybind>
Note that this is a duplicate of the file /etc/xdg/openbox/rc.xml
.
Option 4 is probably the best since it retains original functionality and gives you the quick departure. Just choose your keys wisely. :)
dbus
to logout:dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1 2>&1 && return
. I have never used LXDE but according to these pages (1, 2) similar objects/methods should be available. So, you could try something like:dbus-send --session --type=method_call --print-reply --reply-timeout=2000 --dest=org.lxde.SessionManager /org/lxde/SessionManager org.lxde.SessionManager.Logout uint32:1 2>&1 && return
. – don_crissti Nov 30 '14 at 02:51pkill lxsession
. – don_crissti Nov 30 '14 at 02:52