Re: "systemd-path systemd-search-user-unit" does not match reality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 26, 2024 at 9:59 AM Dan Nicholson <dbn@xxxxxxxxxxxxx> wrote:
>
> On Fri, Jul 26, 2024 at 6:50 AM Vladimir Panteleev
> <git@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > This seems to work:
> >
> > cat > ~/.config/systemd/user.conf <<EOF
> > [Manager]
> > ManagerEnvironment="XDG_DATA_DIRS=%h/.nix-profile/share"
> > EOF
>
> ManagerEnvironment only affects the environment variables for the
> systemd user process. To propagate the environment variable to
> processes spawned by the manager, use DefaultEnvironment. See
> https://www.freedesktop.org/software/systemd/man/latest/systemd-user.conf.html.

Another option here is a user environment generator. See
https://www.freedesktop.org/software/systemd/man/latest/systemd.environment-generator.html.
It even has an example of dynamically updating XDG_DATA_DIRS.

--
Dan




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux