[systemd-devel] Per session systemd?
Yuxuan Shui
yshuiv7 at gmail.com
Sun Mar 2 23:30:12 PST 2014
Hi,
This mail might be a little bit later for the topic, but I would like
to share my thoughts anyway.
Before systemd 206 was released, there are a few users (I don't know
how many of them are there, but there's a page about it on archlinux's
wiki. So I guess it's a well-known use case.) who use systemd to
manage their sessions. For example, they will exec systemd in their
~/.xinitrc, and have systemd start all their X applications.
I know this kind of use case has never been explicitly supported by
systemd, but it was a really nice _accidental_ feature. However, after
the cgroup changes made in the systemd 206 release, it became
impossible to use systemd in such way.
I saw some user complaints, but the systemd developers seemed unmoved.
Maybe because the original purpose of systemd --user is to start
per-user systemd instances. There're hacks to make systemd usable
under a X session. But that's very complicated, and contains many
pitfalls (User have to set a lot of environmental variables, and this
makes logind unhappy since the systemd user instance is not in the
same session as X). Besides, there're reasonable use cases which can't
be covered by a per-user systemd instance, like periodically starting
a graphic application.
So, I wrote a very dirty hack for my systemd, and have been using it
till today. I add a 'User=' property to a session, and have systemd
chown the cgroup to the given user, so I can start systemd in my
.xinitrc as I used to. I admit this is probably a very bad hack, and
I'm not sure if it will still work after the soon coming cgroup
rework.
That's why I'm writing this mail. I want to point out the reason
behind use systemd as a session manager, so you will probably
understand why I want to do this and help me. Since I can't get this
done by myself with my limited systemd knowledge.
Any help will be appreciated. It will be better if you can convince me
that I'm stupid and this feature is totally useless.
Regards,
Yuxuan Shui.
More information about the systemd-devel
mailing list