On Tue, Sep 11, 2018 at 10:34 AM Kamil Jońca <kjonca@xxxxx> wrote:
I post on debian-user, but no answer.
Maybe here I found some knowledge.
KJ
kjonca@xxxxxxxxxxxxxx (Kamil Jońca) writes:
> I tried to setup some user units in my desktop, and have problem with
> env variables.
> So far I set them up in custom .xsession file (in home directory)
> I tried to put
> something like
> systemctl --user import-environment NNTPSERVER
> in my .xsession file, but it looks like this script is run parallel with
> user units, and I have race condition, ie. some units can't see
> variables.
>
> So my question is, where to init variables for user units?
> I woluld like to have possiblity to set them as not only as fixed
> strings
>
> (i.e. I would to have PATH=$PATH:xxx)
>
> KJ
Start your units after this is done. That is, don't link them to your default.target, but call `systemctl --user start foo.service bar.target quux.service` in the same .xsession file right after importing environment.
(This has some advantages: it doesn't delay the whole login process as default.target would, and it allows you to start graphical apps as systemd units.)
Mantas Mikulėnas
_______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel