Questions En > Help requests

SOLVED:Questions about obsession

(1/2) > >>

djohnston:
mimas,

I started to compile obsession for JWM again, but then realized I had not changed the "OpenBox" string to "JWM". So, I started reading through the source files. In obsession.h is this section:


--- Code: ---enum {
        NONE = 0,
        UPOWER,
        CONSOLEKIT,
        SYSTEMD,
        GDM,
        KDM,
        LIGHTDM,
        LXDM
};
--- Fin du code ---

Can JWM be added? I'm not sure it will make any difference. Here's why. I looked at obsession-logout.c and saw this section:


--- Code: ---/* Handler for "clicked" signal on Logout button. */
static void logout_clicked(GtkButton * button, HandlerContext * handler_context)
{
/* kill(handler_context->lxsession_pid, SIGTERM); */
g_spawn_command_line_async("openbox --exit", NULL);
gtk_main_quit();
}
--- Fin du code ---

It's why the Logout function doesn't work in JWM. The function sends a SIGTERM to lxsession, but the process is not running. From what I can see, the only display manager functions running with SLIM/JWM are:

/usr/bin/slim -d (as root) and
x-session-manager (as normal user).

Logout is handled in the .jwmrc (XML file) with the function:

<Exit label="Logout" confirm="false">

Reboot and Shutdown I'm doing with ConsoleKit. Can obsession be modified for JWM?

mimas:
> Can JWM be added? I'm not sure it will make any difference.

Don't add JWM here, it's an enumeration used to dispatch the "power" commands and the login manager commands.

> g_spawn_command_line_async("openbox --exit", NULL);

Nice catch! I absolutely forgot this part. This executes the openbox --exit command and quit the current Openbox session. The previous line is not executed (it's commented), it's from lxsession which stay in memory.. Sending a SIGTERM to lxsession process quit the session.

Replace the "openbox --exit" by "jwm -exit", it should work.

I have planed to add configuration support in obsession. Something like that

--- Code: ---[Config]
SessionExitCmd=jwm -exit
ScreenLockCmd=xlock

--- Fin du code ---

djohnston:

--- Citation de: mimas le 13 juin 2013 à 18:21:01 ---The previous line is not executed (it's commented), it's from lxsession which stay in memory.. Sending a SIGTERM to lxsession process quit the session.
--- Fin de citation ---

I gotta learn how to read C!  :-[


--- Citation de: mimas le 13 juin 2013 à 18:21:01 ---Replace the "openbox --exit" by "jwm -exit", it should work.
--- Fin de citation ---

Thanks! I'll try it later tonight.

melodie:

--- Citation de: djohnston le 14 juin 2013 à 01:45:18 ---I gotta learn how to read C!  :-[
--- Fin de citation ---

Do you want to try to start the course cs50.tv ? It can be started at any time!

djohnston:

--- Citation de: mélodie le 14 juin 2013 à 05:19:46 ---Do you want to try to start the course cs50.tv ? It can be started at any time!
--- Fin de citation ---
Well, that's a CS intro course. I programmed for years. Just haven't written any code in quite a while. And there's not much call for PAL-8 assembly language coders any more. I'm learning Perl, so I'll eventually bridge from there into C.

Navigation

[0] Index des messages

[#] Page suivante

Utiliser la version classique