[systemd-devel] User systemd unit files
Chris Morgan
chmorgan at gmail.com
Tue Sep 9 16:39:17 PDT 2014
On Tue, Sep 9, 2014 at 7:09 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Tue, Sep 09, 2014 at 10:15:06AM -0400, Chris Morgan wrote:
>> On Mon, Sep 8, 2014 at 3:45 PM, Chris Morgan <chmorgan at gmail.com> wrote:
>> > On Mon, Sep 8, 2014 at 3:30 PM, Mantas Mikulėnas <grawity at gmail.com> wrote:
>> >> On Mon, Sep 8, 2014 at 9:27 PM, Chris Morgan <chmorgan at gmail.com> wrote:
>> >>> Hello.
>> >>>
>> >>> We have a build environment that we use to build our software for
>> >>> desktop Linux and we are currently using Yocto to build for an
>> >>> embedded target.
>> >>>
>> >>> I'm looking for a way for developers to use the systemd unit files for
>> >>> our services out of their user owned build directory during
>> >>> development so we can use the same files during development that we
>> >>> would use during production.
> I doubt that systemd services from the final system would be useful
> for in the user session. Usually they include things like User=
> and other settings which require privilege to set up, and are not supported
> in the units for the user session.
>
> If you were more specific in what your are trying to run, it'd be
> be easier.
>
> Zbyszek
>
Sure. Linux environment, developing and testing on desktop, deploying
to Linux embedded system. There are several service-like applications
that we are using systemd to start/restart on the embedded side. I
wanted to see if we could use these unit files out of the developers
directory to start up the local builds of the service applications
etc. On the desktop side we build a fake root filesystem when we
compile the libraries and applications, like
/home/someuser/project/build/rootfs/ that has a bin/, share/ etc.
I've been looking at things like systemd-nspawn, calling passwd to
change my password on a f20 container inside of my f20 vm fails for
some reason, maybe because audit is enabled? Also started looking at
whether something like docker would make sense. I'm a bit new to
containers so I'm not even sure if this is a feasible alternative
approach.
>> >>> I came across 'systemd --user' but I'm not having much luck starting
>> >>> this up as my own user as it looked like $SYSTEMD_UNIT_PATH was
>> >>> exactly what I was looking to set.
>> >>>
>> >>> Fedora 20 cli output:
>> >>>
>> >>> $ /usr/lib/systemd/systemd --user
>> >>> Failed to create root cgroup hierarchy: Permission denied
>> >>> Failed to allocate manager object: Permission denied
>> >>>
>> >>> And some discussion on libreoffice pages seems to be indicating that
>> >>> 'systemd --user' isn't supported any more.
>> >>
>> >> Specifically, running `systemd --user` directly is not supported
>> >> anymore. The user mode still works, but only for one "user" instance
>> >> per UID, launched through user@<uid>.service (recent releases start
>> >> this automatically upon logging in).
> Try 'systemctl --user'. If this start you can put units
> it ~/.config/systemd/user/ or a similar path (check systemd.unit(5) out).
>
> Zbyszek
I tried --user but I get some errors that I pasted above. It looks
like it is no longer supported but I'm not sure.
Chris
More information about the systemd-devel
mailing list