Replies: 1 comment 4 replies
-
There isn't one, unless dinit is started with
What you describe is expected behaviour. From the dinit-service man page: What The better solution, at least for now, is to set the environment variables before dinit starts. You can possibly do that via the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the equivalent of
/etc/dinit/environmentfor dinit when it's started as a user service manager? The only method of importing environment variables in user services that I've found so far is theenv-fileoption but the files in that case do not support variable substitution at all, the values have to be literal strings.I'm using Chimera Linux with dinit version 0.19.3, although the man pages report 0.19.4pre.
Here's a user service I've written:
I tried making a user service which executes this script:
but this doesn't work when logging in. The
ssh-agentprocess starts with an empty value of$SSH_AUTH_SOCK.The only method, as I mentioned earlier, that I've found to work is
where
dinit-user-envisIf I try to use
$(id -u)or$XDG_RUNTIME_DIRin this file, it doesn't work as expected.Can I write a wrapper script or perhaps use a script somehow to import environment variables into the dinit user environment such that any user service I write can resolve those variables without me needing the
env-fileoption? I guess I could write a script that usesdinitctl setenvcommands and then starts user services withdinitctl startbut then that defeats the point of having dinit as a user service manager.Beta Was this translation helpful? Give feedback.
All reactions