-
Notifications
You must be signed in to change notification settings - Fork 30
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
No oidc-agent start when logging in with Wayland #555
Comments
We will need to investigate this further and see what the best solution would be. However, the following should work fairly well: eval `oidc-agent-service use` >/dev/null This will start the agent the first time and on other runs, set the env var. |
If this works, I wonder which is the best way to solve this package wise. |
Usually, distros patch out automatic loading of agents etc. as this should be a user decision, see for example: FWIW, I am currently just dropping the file: |
I just tried adding that file to the Running |
@paulmillar Thanks for testing! That's quite strange, according to the code at https://invent.kde.org/plasma/plasma-workspace/-/blob/master/startkde/startplasma.cpp , that should work — both To cross-check, could you please confirm that manually running:
starts the agent for you, and also:
works (i.e. startts the agent and puts it into the environment of the running shell)? EDIT: Main reason I'm asking is since this broke by accident in 5.2.0 (will be fixed in upcoming 5.2.1) as described in #593 . |
Ah, I've just recreated your analysis see #596. Hey ho. When I manually working around #593 / #596, oidc-agent is started correctly when I log in, as expected. So, for me, the approach here closes this issue. HOWEVER, it looks like this approach is a KDE (or plasma) specific solution. I believe it won't work for other desktop environments. I don't know Wayland well enough to say if there's a desktop-agnostic solution for setting environments. If not, that sounds like a regression compared to X11. |
Thanks for confirming! Sorry, I only thought of editing my initial answer later to link the reported issue. Sadly, it seems Wayland does not offer such a mechanism (due to the different more modular concept, it seems there is no clear replacement for this approach). Using shell init scripts is problematic in its own ways (shell-specific, will also affect non-graphical use cases such as daemons, cronjobs and the I believe that this finally burns down to "the user has to set this up", which also allows sites to decide whether |
No problem. In any case, it's good to hear the problem has already been resolved.
This definitely sounds like a regression, compared to what Xorg offers.
To me, this sounds like a case of putting the cart before the horse: the desired feature-set should dictate the implementation details, not the other way around. Do you happen to know if anyone has already opened an issue (against Wayland) about this? |
Hi Guys, |
I agree, but I guess that this depends on the viewpoint — Wayland does not intend to replicate what Xorg did, it's not a "graphics server", but a collection of protocols, essentially. So more of the original tasks are now delegated to parts of what is commonly called "desktop environment" (e.g. the compositor, startup scripts etc.). [This writeup}(https://pointieststick.com/2023/09/17/so-lets-talk-about-this-wayland-thing/) provides a not-overly-technical summary of the overall conceptual differences and also the "bad sides" of this still causing fragmentation today.
I don't, probably opening a feature is a good idea. While my expectation would be that the answer is something like "it's out of scope for Wayland itself", maybe the answer will rather be something like "this should go in the XDG spec and all DEs should implement it" — or maybe that is already something which is being done.
Thanks @marcvs ! It does relate "in parts", the main problem here is that |
I could look into systemd. Would that help you, or do you use non-systemd distros? |
In general we liked to follow |
Right; I can't use wayland atm. Input from the waylanders would be appreciated. |
Also generally users can make their own integration rather easy by adding eval `oidc-agent-service use` > /dev/null to their |
In my case, non-systemd (Gentoo 😉 ). But arguably, non-systemd users may be able to help themselves...?
That's a good point. The situation appears to be somewhat messy on that end in Wayland environments, though. The cleanest approach is probably the systemd user unit described by ArchLinux: So I'm not sure there is a generic solution — for sure, there are "desktop environment specific" approaches. But it seems there is nothing working on "anything wayland" as there was in the Xorg age. |
With the release of Debian 12 (bookworm) a fresh install will default to using Wayland (instead of X11 / X.org) as its windowing environment.
Note that, as bookworm continues to support X11/X.org, computers that upgrade to bookworm (from an earlier Debian release) will continue to use X11, unless the admin explicitly switches to Wayland.
There seems to be no problem with
oidc-agent
under bookworm when X.org is used. However, with Wayland, theoidc-agent
process is not started.Here is the console output from a shell shortly after logging in:
It is a relatively simple matter to start
oidc-agent
manually within a console. When this is done, the agent behaves as expected:Starting
oidc-agent
manually suffers from the (expected) limitation that the oidc-agent environment variables are only known to that specific shell. If that agent should be accessible from processes started outside of that shell (e.g., having multiple tabs in the console) then those variables must be (manually) copied.Starting
oidc-agent
as part of the X11/X.org login procedure alleviates this limitation. All child processes will share a common oidc-agent instance and inherit that agent's environment variables.It would be helpful if some similar mechanism exists for Wayland that would allow all child processes of the login session to share a common oidc-agent instance; for example, by having all child processes inherit the oidc-agent environment variables (as currently happens with X.org).
The text was updated successfully, but these errors were encountered: