Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same enviroment variable for all lemur environments #215

Closed
diggit opened this issue Oct 25, 2024 · 1 comment
Closed

Same enviroment variable for all lemur environments #215

diggit opened this issue Oct 25, 2024 · 1 comment

Comments

@diggit
Copy link

diggit commented Oct 25, 2024

Hi,
is there a way how to ensure all lemur environments get same additional environment variables?

My idea is to use systemd env generator /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator (which combines all *.conf files from ~/.config/environment.d/ into stdout) and provide this environment to all.

for sway example it could be done this way:

#! /bin/sh
set -a
eval $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)
set +a
exec sway

but how to achieve same thing for TTY shell enabled by include_tty_shell = true ?

Maybe related to #196. Custom "tty sessions" could be then just wrapped also into the script like sway above.

@diggit
Copy link
Author

diggit commented Oct 25, 2024

Hmm, one option could be to exec sway from user shell and assume the user shell handles initialization of all environment variables:

#! /bin/sh
exec $SHELL -c "exec sway"

tty shell lemurs environment just launches user shell, so same env. variables there.

I am curious if there is a better way...

@diggit diggit closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant