Open paulmillar opened 7 months ago
We will need to investigate this further and see what the best solution would be.
However, the following should work fairly well:
Put the following line into your .bashrc
:
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. I.e. is there a well understood way to put it into a shell startup env? /etc/bashrc or s.th.?
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).