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

~/.config/environment.d conf files are not loaded in cosmic-session #76

Open
ryanabx opened this issue Oct 27, 2024 · 7 comments
Open

Comments

@ryanabx
Copy link
Contributor

ryanabx commented Oct 27, 2024

Version:

cosmic-session-1.0.0~alpha.2^git20241016.c3a35f3-1.fc41.x86_64

systemd environment files can be set in these places:

System-Wide Directories:

/etc/environment.d/
/run/environment.d/
/usr/lib/environment.d/

User-Specific Directory:

~/.config/environment.d/

I put an environment file in ~/.config/environment.d and it wasn't loaded by cosmic-session. kde's session loads it.

@ryanabx ryanabx changed the title ~/.config/environment.d conf files are not utilized in cosmic-session ~/.config/environment.d conf files are not loaded in cosmic-session Oct 27, 2024
@Drakulix
Copy link
Member

I am pretty sure, that would be a configuration issue (though I would be very curious to know what KDE does different here exactly) as all cosmic-session is doing is launching a login-shell. Loading profile and environment should be handled by that?

@wiiznokes
Copy link

I ran is this issue for my applet cosmic-utils/clipboard-manager#82 (comment)

@ryanabx
Copy link
Contributor Author

ryanabx commented Oct 28, 2024

I am pretty sure, that would be a configuration issue (though I would be very curious to know what KDE does different here exactly) as all cosmic-session is doing is launching a login-shell. Loading profile and environment should be handled by that?

Is this reproducible on Pop? If not it definitely could be a fedora only issue.

@Vixea
Copy link

Vixea commented Jan 2, 2025

Reproducable in serpent-os, its caused by a lack of explicitly getting environment variables it seems.

(Both Gnome and KDE explicitly get the environment variables.. So looks to be expected behavior from distros)

@Vixea
Copy link

Vixea commented Jan 7, 2025

A person working with/on serpentos has made a patch
serpent-os/recipes#507
They'll submit it eventually here but if your affected by it and want it working now just apply the patch

@ReillyBrogan
Copy link

Yes I created a quick and dirty patch there since we needed to propagate certain variable from the user manager into the session. If the patch looks reasonable as-is I can clean it up a bit for a PR but realistically I'm not sure I'll have time if more work is requested than that.

For reference I largely adapted the code from plasma-workspace which does the same thing. Both Plasma and GNOME directly support importing the user environment from systemd in case the login manager doesn't support doing so before the session is started (I think only GDM does that currently). I didn't really spend any time tracking down the implementation for GNOME once I had plasma-workspace in front of me as a reference however.

@Drakulix
Copy link
Member

Drakulix commented Jan 9, 2025

Yes I created a quick and dirty patch there since we needed to propagate certain variable from the user manager into the session. If the patch looks reasonable as-is I can clean it up a bit for a PR but realistically I'm not sure I'll have time if more work is requested than that.

The patch looks fine on first glance. Please open a PR, I am pretty sure this could be merged quickly without much fuzz.

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

5 participants