Comments (7)
Oh I see you are already using, is there a reason that editing the service is still needed?
from localdir.
I noticed that in some places you set vars manually or parse environment.d you can just call:
export $(run-parts /usr/lib/systemd/user-environment-generators | xargs)
Instead.
from localdir.
Hi, thanks for your interest in this repo! :-)
The PAM approach no longer works due to pam_env.so
having deprecated the user_readenv
option (discussions in linux-pam#7), hence my switch to something that does not involve PAM in cea0a05.
However, in that commit I also noticed that merely using environment.d does not work entirely as intended, because the systemd user instance itself does not adopt the variables. So while all user units adopt the new envvars, systemd itself reads its units from ~/.config/systemd
, replaces %E
in unit files by ~/.config
, etc.
The way I see it, there is currently no way of solving the bootstrapping issue purely on a user level, hence my workaround solution of extending my user's [email protected]
where possible, or simply give up and let systemd create a mess in my homedir.
On using the provided environment generators rather than parsing the variable files manually, that does seem more elegant indeed, thanks for the suggestion! :-)
I'll see if I can implement this sometime soon.
from localdir.
from localdir.
Improved environment generation in 5460772 (no more manual parsing). Not doing it with run-parts, because I cannot assume that to be universally available.
If you set the variables early enough than it picks them up.
Unfortunately, the "early enough" is "before the user unit starts", so it's either extending the user unit itself or setting the variables at PAM level (e.g. /etc/environment
, which is ugly).
Ideally, [email protected]
would allow the user to provide an environment file somewhere in it's home (I'd probably go with ~/.environment
) that it sources with EnvironmentFile=-…
, but I could not find a way to determine the user name from within the unit file. 🙁
from localdir.
Improved environment generation in 5460772 (no more manual parsing). Not doing it with run-parts, because I cannot assume that to be universally available.
I used xargs -0, didn't use eval but that seems to work too.
If you set the variables early enough than it picks them up.
Unfortunately, the "early enough" is "before the user unit starts", so it's either extending the user unit itself or setting the variables at PAM level (e.g.
/etc/environment
, which is ugly).
Ideally,
[email protected]
would allow the user to provide an environment file somewhere in it's home (I'd probably go with~/.environment
) that it sources withEnvironmentFile=-…
, but I could not find a way to determine the user name from within the unit file. slightly_frowning_face
Yeah that is what I couldn't avoid too. But anything outside of /etc is chicken and e.g. issue.
from localdir.
Turned out my solution was a bit bugged (only found out later upon restarting my session), so had to adapt the variable exporting a little more with 1e25dd7, but it now works for me.
Going to close this for now, thanks for your input!
from localdir.
Related Issues (20)
- Ownership of vim files if running with sudo -E HOT 2
- X keyboard layout not applied on some machines HOT 1
- etc/X11/Xresources hardcodes home directory path HOT 2
- Broken link HOT 1
- Get rid of remaining wrappers HOT 8
- Print node-specific logo instead of OS logo on login (if at all)
- What happened to karuibar HOT 2
- Improve starting X11 HOT 3
- mutt: Replace pgp_self_encrypt_as by pgp_default_key? HOT 2
- vim: Don't use double space after a period for `gqap`
- Userscripts are unavailable during qutebrowser sessions HOT 4
- Add XDG_STATE_HOME HOT 6
- qutebrowser: Prevent proliferation of sessions
- Switch to environment.d for setting envvars HOT 10
- pulseaudio-tcp.service: Doesn't load TCP module at initial startup HOT 1
- Trigger automatic action when (un)plugging screens HOT 1
- Add karuiwm configuration HOT 1
- Strip out wrapper and env files to submodule HOT 4
- Qt/KDE saving their state into their configuration files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localdir.