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

systemctl import-environment without specifying desired variables is deprecated #254

Open
jokeyrhyme opened this issue Mar 12, 2024 · 3 comments · May be fixed by #255
Open

systemctl import-environment without specifying desired variables is deprecated #254

jokeyrhyme opened this issue Mar 12, 2024 · 3 comments · May be fixed by #255
Labels
bug Something isn't working

Comments

@jokeyrhyme
Copy link

Howdie, thanks so much for sharing this project! <3

I noticed a deprecation message pop up briefly during niri's launch, and I tracked it down to this: systemd/systemd#18137

And we call systemctl --user import-environment without specific variable names here:

systemctl --user import-environment

The thing is, I'm not sure when this will stop working on the systemctl side, seeing as it's been deprecated for years

And I'm not even sure what I'd recommend going forward

  • do we drop the line completely? this might break existing user scripts, however, these values will still end up in the environment variables for the niri process itself (and thus every child process it launches), just not in the user service manager
  • do we provide a list of variables that users are likely to want (e.g. PATH)? that seems like a game of whack-a-mole

Another aspect of the current behaviour is that variables from the virtual console environment end up in my user service manager environment, like TERM=linux and PWD which are often unhelpful/confusing once I'm in a GUI desktop environment (but I can probably find workarounds for my own stuff)

Anyhow, this has probably not been super helpful, but I thought I'd log it, just in case anyone else notices the deprecation message :)

@jokeyrhyme jokeyrhyme added the bug Something isn't working label Mar 12, 2024
@YaLTeR
Copy link
Owner

YaLTeR commented Mar 12, 2024

Hey! I cargo culted that line from other projects. I'm not sure if it's actually needed. Could try removing it (and the dbus one below) and see if everything still works?

The actually important variables like WAYLAND_DISPLAY are imported by the niri binary itself.

@jokeyrhyme
Copy link
Author

jokeyrhyme commented Mar 12, 2024

I believe we'd still want the WAYLAND_DISPLAY and XDG_... variables to end up in D-Bus and systemd after niri is ready and before too many (or any at all) other new processes have started

I had a related conversation with the COSMIC folks about this, but that solution doesn't map cleanly to the infrastructure we have here: pop-os/cosmic-session#31

@YaLTeR
Copy link
Owner

YaLTeR commented Mar 12, 2024

I believe we'd still want the WAYLAND_DISPLAY and XDG_... variables to end up in D-Bus and systemd after niri is ready and before too many (or any at all) other new processes have started

Yeah, the niri binary takes care of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants