LinuxVillage

Questions En => Help requests => Discussion démarrée par: djohnston le 13 juin 2013 à 06:47:16

Titre: SOLVED:Questions about obsession
Posté par: djohnston le 13 juin 2013 à 06:47:16
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:

enum {
        NONE = 0,
        UPOWER,
        CONSOLEKIT,
        SYSTEMD,
        GDM,
        KDM,
        LIGHTDM,
        LXDM
};

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:

/* 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();
}

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?

Titre: Re : Questions about obsession
Posté par: mimas le 13 juin 2013 à 18:21:01
> 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
[Config]
SessionExitCmd=jwm -exit
ScreenLockCmd=xlock
Titre: Re : Re : Questions about obsession
Posté par: djohnston le 14 juin 2013 à 01:45:18
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.

I gotta learn how to read C!  :-[

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

Thanks! I'll try it later tonight.
Titre: Re : Re : Re : Questions about obsession
Posté par: melodie le 14 juin 2013 à 05:19:46
I gotta learn how to read C!  :-[

Do you want to try to start the course cs50.tv (http://linuxvillage.net/index.php/topic,298.msg2786.html#msg2786) ? It can be started at any time!
Titre: Re : Re : Re : Re : Questions about obsession
Posté par: djohnston le 14 juin 2013 à 05:32:24
Do you want to try to start the course cs50.tv (http://linuxvillage.net/index.php/topic,298.msg2786.html#msg2786) ? It can be started at any time!
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.
Titre: Re : Re : Questions about obsession
Posté par: djohnston le 14 juin 2013 à 07:54:38
Replace the "openbox --exit" by "jwm -exit", it should work.
Yessiree, Bob. Er, mimas. Works like a charm.

(http://s19.postimg.org/8qexjljbz/VSLV03.jpg) (http://postimg.org/image/8qexjljbz/)

One thing, though. There are no uninstall rules. It's easy enough to "uninstall", though. Just make sure you get all the .po files, too. Oh, another thing. Can you put some fluffy bunnies in the background? Or a mika cat chasing the mouse? No, no. I've got it! Some clowns chasing Bill Gates. Yeah, that's the ticket! Can you put some clowns chasing Bill Gates in the background? People won't know what to think.  ;D

Titre: Re : Re : Re : Re : Re : Questions about obsession
Posté par: melodie le 14 juin 2013 à 13:51:43
Well, that's a CS intro course. I programmed for years.

The course contains some C, and the second video I watched was quite nice and interesting, so I thought you might want to have a look at it. Additionnally the videos can be downloaded and watched as time allows. If you would want more info, you could come to continue to talk about it on the other thread.


PS: you antiX spin seems to come out nicely! I would like to try it on my eldest machine.