You are not logged in.

#1 2013-05-25 00:46:26

farmerdave
Member
Registered: 2011-11-23
Posts: 114

[SOLVED] openbox and lxpanel - help configure logout

I've put a minimal install of Arch on my laptop, with openbox WM and only installing lxde packages as required. So far I've got Slim, openbox, lxpanel, lxsession, lxmenu and upower installed. I'm trying to get it so that Ctrl+Alt+Del brings upon a "logout/restart/shutdown" window, and choosing "logout" from the panel menu does the same (I'd essentially like the xfce4-session-logout window)

Currently the root-menu has menu item in ~/.config/openbox/menu.xml

<item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
</item>

but choosing this returns a window displaying "Logout command is not set".

I made a custom keybind for Ctrl+Alt+Del

<!-- Keybindings for logging out-->
  <keybind key="C-A-Delete">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
</keybind>

which gives me an option to exit openbox, but selecting yes immediately logs me out, and then presents me with a Slim login.

I'm a little lost now, can I get some help getting this right?

Last edited by farmerdave (2013-06-05 09:31:41)

Offline

#2 2013-05-25 01:32:17

dodo3773
Member
Registered: 2011-03-17
Posts: 820

Re: [SOLVED] openbox and lxpanel - help configure logout

You have to tell it what to execute as well. Something like this should work (I use oblogout though so I am unsure of the <prompt>yes</prompt> section):

<item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
      <execute>openbox --exit</execute>
    </action>
</item>

Edit: It may be <command> actually (at least in rc.xml) here is the relevant section from my rc.xml

<keybind key="A-C-Delete">
      <action name="Execute">
        <command>oblogout</command>
      </action>
    </keybind>

Edit2: If you are exiting openbox then getting sent back to your display manager is what it is suppose to do. Unless you just startx from a tty

Last edited by dodo3773 (2013-05-25 01:36:28)

Offline

#3 2013-05-25 06:50:42

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] openbox and lxpanel - help configure logout

Thanks, seeing the "execute" tag it now seems really logical something like that is needed!

Offline

#4 2013-05-25 06:56:52

dodo3773
Member
Registered: 2011-03-17
Posts: 820

Re: [SOLVED] openbox and lxpanel - help configure logout

farmerdave wrote:

Thanks, seeing the "execute" tag it now seems really logical something like that is needed!

You're welcome. Glad you got it sorted out.

Offline

#5 2013-05-27 18:31:05

LPS-Leipzig
Member
Registered: 2013-05-21
Posts: 21

Re: [SOLVED] openbox and lxpanel - help configure logout

you can also use lxde-logout for the openbox menu:

<item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
      <execute>lxde-logout</execute>
    </action>
</item>

and the keybinding (i use "obkey" to set keybindings):

<keybind key="A-C-Delete">
      <action name="Execute">
        <command>lxde-logout</command>
      </action>
    </keybind>

to define the logout button of the lxpanel, you can simply edit your:

 
/home/YOURUSERNAME/.config/lxpanel/LXDE/config

and fill in this text:

 
[Command]
FileManager=pcmanfm %s
Terminal=lxterminal
Logout=lxde-logout

this results in:
http://www.jaypac.de/upload/316418lxlogout.png

Mod Edit (ewaller) oversize inline picture converted to link

Last edited by ewaller (2013-05-27 21:02:48)

Offline

#6 2013-06-01 09:25:30

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] openbox and lxpanel - help configure logout

@LPS-Leipzig, I put the first suggestion into ~/.config/openbox/menu.xml and it works great. The third suggestion works perfectly in ~/.config/lxpanel/LXDE/config too.

I can't get the second suggestion to work in ~/.config/openbox/rc.xml however. When I try Ctrl+Alt+Del I get a window which states

Failed to execute child process "lxtask" (No such file or directory)

I've tried to make some guesses as to what might be needed, e.g. using <action name="Exit"> instead, but I get the same no matter what.

Offline

#7 2013-06-01 09:35:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] openbox and lxpanel - help configure logout

Without installing any extra packages, I just put the following in menu.xml:

		<item label="Hibernate">
			<action name="Execute">
				<execute>
					systemctl hibernate
				</execute>
			</action>
		</item>
		<item label="Reboot">
			<action name="Execute">
				<execute>
					systemctl reboot
				</execute>
			</action>
		</item>
		<item label="Shutdown">
			<action name="Execute">
				<execute>
					systemctl poweroff
				</execute>
			</action>
		</item>

Works fine.

Offline

#8 2013-06-02 02:29:12

dodo3773
Member
Registered: 2011-03-17
Posts: 820

Re: [SOLVED] openbox and lxpanel - help configure logout

farmerdave wrote:

@LPS-Leipzig, I put the first suggestion into ~/.config/openbox/menu.xml and it works great. The third suggestion works perfectly in ~/.config/lxpanel/LXDE/config too.

I can't get the second suggestion to work in ~/.config/openbox/rc.xml however. When I try Ctrl+Alt+Del I get a window which states

Failed to execute child process "lxtask" (No such file or directory)

I've tried to make some guesses as to what might be needed, e.g. using <action name="Exit"> instead, but I get the same no matter what.


You remembered to "openbox --reconfigure" after changing rc.xml right?

Offline

#9 2013-06-02 06:30:31

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] openbox and lxpanel - help configure logout

dodo3773 wrote:

You remembered to "openbox --reconfigure" after changing rc.xml right?

Sure did, even rebooting didn't help.

Offline

#10 2013-06-02 06:35:49

dodo3773
Member
Registered: 2011-03-17
Posts: 820

Re: [SOLVED] openbox and lxpanel - help configure logout

Well, I don't know what lxtask is but there is an lxtask program in the repo. My oblogout just points to the commands tomk pointed out anyways. I may get rid of mine and just do the same thing. But yeah try installing lxtask and see if your command works. You may want to post your rc.xml file too if you keep having issues.

Offline

#11 2013-06-03 10:14:59

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] openbox and lxpanel - help configure logout

So I installed lxtask, and now Ctrl+Alt+Delete opens it (the lxde task manager). Why this is happening is beyond me, I certainly didn't want it. The phrase "lxtask" does not appear anywhere in /etc/xdg/openbox/rc.xml or ~/.config/openbox/rc.xml.

The only changes to rc.xml that I have made are in ~/.config/openbox/rc.xml, the one in /etc/xdg/openbox/rc.xml is left at the default. The difference is

$ diff /etc/xdg/openbox/rc.xml .config/openbox/rc.xml
213a214,225
>   <keybind key="C-A-1">
>     <action name="SendToDesktop"><to>1</to><wrap>no</wrap></action>
>   </keybind>
>   <keybind key="C-A-2">
>     <action name="SendToDesktop"><to>2</to><wrap>no</wrap></action>
>   </keybind>
>   <keybind key="C-A-3">
>     <action name="SendToDesktop"><to>3</to><wrap>no</wrap></action>
>   </keybind>
>   <keybind key="C-A-4">
>     <action name="SendToDesktop"><to>4</to><wrap>no</wrap></action>
>   </keybind>
236a249,253
>   <keybind key="A-F2">
>     <action name="Execute">
>       <command>lxpanelctl run</command>
>     </action>
>   </keybind>
308a326,333
>     </action>
>   </keybind>
>   
>   <!-- Keybindings for logging out-->
>   <keybind key="A-C-Delete">
>     <action name="Execute">
>       <prompt>yes</prompt>
>       <command>lxde-logout</command>

I'm at a loss!

Offline

#12 2013-06-03 16:21:32

dodo3773
Member
Registered: 2011-03-17
Posts: 820

Re: [SOLVED] openbox and lxpanel - help configure logout

Why isn't there a closing </action> and </keybind>? Looks like you have them above the command for some reason.

Offline

#13 2013-06-03 22:58:07

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] openbox and lxpanel - help configure logout

This is just a "diff" command output, I inserted the 'lxde-logout' command before the last action/keybind closing tags and hence it shows up as a difference from the original. Pretty sure my rc.xml is formatted correctly.

Last edited by farmerdave (2013-06-03 22:58:44)

Offline

#14 2013-06-05 09:31:16

farmerdave
Member
Registered: 2011-11-23
Posts: 114

Re: [SOLVED] openbox and lxpanel - help configure logout

Well, this is now solved. I somehow missed that a new file exists inthe config folder, ~/.config/openbox/lxde-rc.xml. This seems to have happened when I installed lxde-common (I think) the day before I noticed the trouble. I had my system running without this package, and noticed that for a minimal LXDE system it should be there.

This file is a modified rc.xml and it had the key combination C-A-Delete set to open lxtask. I've changed this to my liking, and now everything is well.

Offline

Board footer

Powered by FluxBB