[systemd-devel] Enlightenment and systemd user session.

Cedric BAIL cedric.bail at free.fr
Sat Mar 16 08:10:50 PDT 2013


Hello,

   I am currently working on improving Enlightenment integration with
Systemd. So far, I have done the easiest thing, socket activation in
our network library with just one flag and notification when the main
loop is finally started. I am now facing various issue.

   I have added support for Journal. It is turned on by default when
the application is started by systemd. I don't think I made anything
wrong, but it seems that Journal doesn't know about systemd user
session unit, is that correct ? I am thinking that because I get the
following :

$ systemctl --user status elev8d.service
elev8d.service - Elev8 javascript preloading service
          Loaded: loaded
(/home/cedric/.config/systemd/user/elev8d.service; enabled)
          Active: active (running) since Sat 2013-03-16 23:26:04 KST; 7s ago
        Main PID: 32732 (elev8)
          CGroup: name=systemd:/user/cedric/1/systemd-354/elev8d.service
                  └─32732 /usr/bin/elev8 --server

And the journal tell me :
Mar 16 23:26:04 samy systemd[1]: Cannot find unit for notify message
of PID 32732.

See that both PID do match.

You can see my code here :
http://git.enlightenment.org/core/efl.git/commit/id=06ce7c2ede9b38f34d3abb41cd484da87a9988c5
. Any hint on what is going on is welcome.

   Now, one of my goal is to remove enlightenment_start binary when in
a systemd user session. That process start enlightenment and monitor
it. If it crash, it generate a backtrace and restart it. If the user
request Enlightenment to restart (common use case for all developers),
it will exit with a specific value and enlightenment_start will
restart it. Of course if the user exit it normally, it does just quit.
I can implement all of this in a systemd unit, but it comes at a cost.
I am loosing all the applications started by Enlightenment ! Any idea
how we could prevent that ?

   There is two additional process that do have the same issue :
   - elm_quicklaunch: a daemon doing linking and initialization of
EFL, then waiting for request to fork and load EFL application (I
think KDE has something similar).
   - elev8: a daemon that initialize EFL and our v8 binding, then
waiting for request to fork and run JavaScript application.

   As both of those process start visible application that should not
be killed on a restart of the initialization daemon carelessly, they
do have the same issue as Enlightenment.

   Something that would be nice is if we could instruct systemd about
those child process somehow. Even better would be, if possible, a
library to share the cgroup and all that infrastructure that systemd
use when setting up a process before doing exec. That could have a
simple API with just one function that could receive a token coming
from a .desktop or something like that. Just a thought.

    I think I am a little bit late about integrating systemd user
session in a desktop, is there any document that describe what people
are trying to achieve somewhere ? Maybe something related to GNOME as
I heard they did already start working on it.

Thanks,
-- 
Cedric BAIL


More information about the systemd-devel mailing list