Openbox and lxsession-logout

The standard session manager used by LXDE - http://wiki.lxde.org/en/LXSession
Locked
OU812
Posts: 4
Joined: Sun Jun 07, 2009 12:20 am

Openbox and lxsession-logout

Post by OU812 »

Hello. I am running a debian-based system. I had only openbox with lxpanel installed. I wrote a short script to call a custom logout script and saved it as /usr/bin/lxsession-logout. So when I chose logout from the lxpanel menu, my custom logout script would run.

But I decided to do a full lxde install and give users the choice of lxde or openbox + lxpanel. The problem is my file got overwritten. Now I can only logout from the lxde session and not the openbox session. So I am trying to find a way to have openbox access my custom logout script when logout is chosen from the lxpanel menu during an openbox session. My first try was to add this line to ~/.config/openbox/autostart

ln -s /usr/bin/antix-logout /usr/bin/lxsession-logout

but it didn't work. How do I get this to work? Or should I just edit the lxpanel menu to open the custom app? Or would that need a symlink also?

Any ideas? Thanks.

john
Marty Jack
Posts: 381
Joined: Mon Mar 23, 2009 5:14 am

Re: Openbox and lxsession-logout

Post by Marty Jack »

In .config/lxpanel/LXDE/config add Logout=path-to-logout-program

If not running under lxsession, this should also be in the GUI under the Panel Settings/Advanced tab.
OU812
Posts: 4
Joined: Sun Jun 07, 2009 12:20 am

Re: Openbox and lxsession-logout

Post by OU812 »

Thanks. I made the second suggested edit, but no joy. Then I made the first edit, but no joy. If it means anything, I'm running slim.

Should I just replace lxde-logout with my version of it? This way the custom logout script will be called from both environments. (my script seems to have the same options: logout, lock, reboot, shutdown, hibernate, and suspend.)

Thanks.

john
OU812
Posts: 4
Joined: Sun Jun 07, 2009 12:20 am

Re: Openbox and lxsession-logout

Post by OU812 »

I ran my script and tested the logout button. It didn't work. The button executes the command "openbox --exit". So it doesn't look like I can run the script in both environments. I will only be able to run my script in the openox environment.

Anything else I can try? Thanks.

john
OU812
Posts: 4
Joined: Sun Jun 07, 2009 12:20 am

Re: Openbox and lxsession-logout

Post by OU812 »

Thanks for pointing me in the right direction. I have an old fbpanel config file that I edited. I must have tried openbox + fbpanel before I tried openbox + lxpanel. I used the fbpanel config file as a model to edit ~/.config/lxpanel/default/panel as follows:

Code: Select all

        item {
            image=gnome-logout
            name=Logout
            action=/usr/local/bin/exitantix.sh
        }
And it works. Now I can use my custom script in openbox and the lxde logout app within lxde. No apparent conflicts.

john
Locked