The meaning behind the naming convention for the files is that they are loaded in alphabetical order, so it allows you to specify their order easily, and using tens of the numbers allows you to inject something in specific places, like 51-something between 50-early and 60-late. It's usually the case with something.d folders.
I literally never heard of that path before.. I always set my environment variables either in /etc/environment or /etc/profile, typically I place the XDG specification variables in /etc/profile and every other variable goes into /etc/environment
@@user-ux2kk5vp7m This is directly from the ArchLinux wiki about environmental variables: /etc/environment is used by the pam_env module and is shell agnostic so scripting or glob expansion cannot be used. The file only accepts variable=value pairs. /etc/profile initializes variables for login shells only. It does, however, run scripts and can be used by all Bourne shell compatible shells So, I put the XDG variables in /etc/profile because /etc/environment only takes direct values, and not parsed ones
if anyone is curious the naming convention part is mentioned in the mans of systemd-system.conf, system.conf.d, systemd-user.conf and user.conf.d under 'Configuration Directories and Precedence '
7:23, There are some people in this photo that I don't know. From top to bottom, left to right: Richard Stallman, Unknown, unknown, unknown, unknown, chris titus tech tips, unknown Luke, Linus Sebastian, Anthony, Brodie?, Bryan Lunduke, Luke Smith, Unknown, Level1Tech, Distrotube, Linus, Orxdinary gamer, meme guy, tech hut
printenv skips a lot of variables, declare -p catches a lot more (double for me). Both those won't show functions though, for that you want declare -f but that flag can't be combined with declare -p. (Extra: For just the function names, use declare -F) tldr; # Instead of printenv use: declare -f && declare -p Great show as always.
I set my environment variables in "/etc/profile.d/env.sh" because I can use variables. "environment.d" does not allow variables, because it is not a script.
Oh I heard of this path before... It was the first time that I installed arch and immediatelly ran into some configuration problem that had to be resolved by editing that config file. It was god damn annoying. Edit: I remembered it now. My OS Prober wouldn't work because systemd blocked it by default. I couldn't dual boot. The fix was to enable it in the previosly mentioned file.
@@genericgamer1319 Just need to set the variable in the right place. setting environment variables is always before the command so: A=some sudo echo "$A"
I actually use /etc/environment to set my ZDOTDIR variable and have all my .zsh files in the .config/zsh folder instead of having .zshenv in home. Is it a good practice? I don't know
this could get pretty complex for sshd, it's not good to possibly have your path modified in all these places. I wonder if sshd uses all these same configuration files. Time for a bunch of VAR=ImHere1 entries I guess. even LANG can be messed with to have some things "lying in wait", or just some nasty old IBM 3270 cursor codes, etc. Seriously though, this seems to potentially circumvent a lot of secure organization, it's rather odd n messy n worrisome, i had no idea.
yeah, 'environment variables' are usually only needed if you are changing some technical stuff about the inner workings. However, a pretty practical example is setting what editor pops up when you run 'sudoedit /etc/anapp/setting.conf' with the EDITOR variable... provided you ever need to edit files in the /etc directory, that is.. :D
I have been watching your videos for a long time and you never seem to get things right about fish. So let me tell you. Everything in fish is done from ~/.config/fish/config.fish. Starting from setting up aliases , abbreviations to defining function. You can source other files for different things but it is the default.
LOL both times in your example you check with '--user' flag only. But the 2nd time i try without the flag. And it does not propagate the stuff in /etc/environment into any system level (non user) systemd environment. if you try 'systemctl show-environment'. it isnt included there! so what is the best solution to fix this silly non-congruent corner cases buggy behavior? Mut we all now manually smlink the /etc/environment into /etc/environment.d/ folder? Why is this featire so utterly jank? You'd have thought they paid the sytemd guys enough money for it? After ibm paying out 34 billion for the whole company? Dear me. It"s pretty laughable
Yeah, everything about systemd is sad really. I'm trying to figure out how I can create a package in the AUR to make *everything* put its configuration files outside of ~ and it looks like `/etc/security/pam_env.conf` might be the only way
The meaning behind the naming convention for the files is that they are loaded in alphabetical order, so it allows you to specify their order easily, and using tens of the numbers allows you to inject something in specific places, like 51-something between 50-early and 60-late. It's usually the case with something.d folders.
So you're telling me it will technically load without the numbers, but is bad practice?
@@coatlessali yes
I think there is an issue at 0:32 the banner shows with black background
I literally never heard of that path before.. I always set my environment variables either in /etc/environment or /etc/profile, typically I place the XDG specification variables in /etc/profile and every other variable goes into /etc/environment
Why split between /etc/environment and /etc/profile?
@@user-ux2kk5vp7m This is directly from the ArchLinux wiki about environmental variables:
/etc/environment is used by the pam_env module and is shell agnostic so scripting or glob expansion cannot be used. The file only accepts variable=value pairs.
/etc/profile initializes variables for login shells only. It does, however, run scripts and can be used by all Bourne shell compatible shells
So, I put the XDG variables in /etc/profile because /etc/environment only takes direct values, and not parsed ones
systemctl daemon-reload && systemctl daemon-reexec
That should reload and re-execute all of systemd without rebooting.
he said among us....
sus
if anyone is curious the naming convention part is mentioned in the mans of systemd-system.conf, system.conf.d, systemd-user.conf and user.conf.d under 'Configuration Directories and Precedence
'
7:23, There are some people in this photo that I don't know.
From top to bottom, left to right:
Richard Stallman,
Unknown, unknown, unknown, unknown, chris titus tech tips, unknown
Luke, Linus Sebastian, Anthony, Brodie?, Bryan Lunduke, Luke Smith, Unknown, Level1Tech, Distrotube, Linus, Orxdinary gamer, meme guy, tech hut
There's a small banner issue near the start
printenv skips a lot of variables, declare -p catches a lot more (double for me). Both those won't show functions though, for that you want declare -f but that flag can't be combined with declare -p. (Extra: For just the function names, use declare -F)
tldr;
# Instead of printenv use:
declare -f && declare -p
Great show as always.
I use Void Linux, btw.
Hey found a distro friend
0:31 Your overlay didn't composite properly.
I set my environment variables in "/etc/profile.d/env.sh" because I can use variables. "environment.d" does not allow variables, because it is not a script.
also it seems to solve the ``env problem'' presented in the video
That’s pretty important especially for starting up wayland compositors -.^
That systemd thumbnail really got me curious lol
0:31 Does kdenlive acting up again or it's just you Brodie? 😆
So... What is the benefit of using systemd for environment config?
How did you set up the color highlights where the typed command is colored when it's a valid command vs invalid command being a different color?
zsh
Oh I heard of this path before... It was the first time that I installed arch and immediatelly ran into some configuration problem that had to be resolved by editing that config file.
It was god damn annoying.
Edit: I remembered it now. My OS Prober wouldn't work because systemd blocked it by default. I couldn't dual boot.
The fix was to enable it in the previosly mentioned file.
why would systemd do things so diferently:?
Because systemd
I still want that wallpaper
You don't need to use env command explicitly. You can just do 'NAME=VALUE', and things like 'NAME=VALUE alacritty' also works.
yup but if you use sudo or things like it i think you do need env
@@genericgamer1319 Just need to set the variable in the right place. setting environment variables is always before the command so:
A=some sudo echo "$A"
@@martinsavc3202 that doesn't work on my system though even specifying the zsh -c ""echo $A" doesn;t really show anything even using env strange
@@genericgamer1319 that's strange. :\ darn shells
Interesting - that’s new to me. But then, so is systemd :-)
I used to set them via PAM
I actually use /etc/environment to set my ZDOTDIR variable and have all my .zsh files in the .config/zsh folder instead of having .zshenv in home. Is it a good practice? I don't know
I didn't know you could move the .zshenv like that
My ocd wouldnt let me have two .zsh files on different dirs
@@Shimgao I don't think that's a disorder, it's just good taste in aesthetics.
I assume what happens at 0:31 was not intentional
I replaced my video layer with my overlay rather than putting it on top
runit moment
I use void Linux, btw.
How do you set environment variables in a GUI?
Modify the file in gui text editor?
Sorry @Albatross but I really wish I could laugh react Brodie's answer!!!!
You want env variables to be used in a gui right? If so, don't define them in your shell you can use the method mentioned in the video to do so
0:02
no way
0:02 sus word
Please fix your audio. It has a higher pitch which makes it hard to watch your video regardless how awesome the content is.
*Inhales*
IT'S A FEATURE IN OPENRC TOO !!111!! PAY ATTENTION TO ME !!11! I'M DIFFERENT
the wallpaper tho!
Systemd overcomplicating things, as always
i guess this guy is a big nyanners fan huh. cool video
0:02 among us
yeah but.... runit tho.. ;)
4rth Hokage.
Haha, you said among us.
systemd sshd debian environment.d More To Environment Variables Than You Know
this could get pretty complex for sshd, it's not good to possibly have your path modified in all these places. I wonder if sshd uses all these same configuration files. Time for a bunch of VAR=ImHere1 entries I guess.
even LANG can be messed with to have some things "lying in wait", or just some nasty old IBM 3270 cursor codes, etc.
Seriously though, this seems to potentially circumvent a lot of secure organization, it's rather odd n messy n worrisome, i had no idea.
wrong! I use openrc, ahaha
There's always at least one
I never set any environment variables. I just USE my Linux Mint Cinnamon PC and it just works...no nonsense about it. *shrugs*
yeah, 'environment variables' are usually only needed if you are changing some technical stuff about the inner workings.
However, a pretty practical example is setting what editor pops up when you run 'sudoedit /etc/anapp/setting.conf' with the EDITOR variable... provided you ever need to edit files in the /etc directory, that is.. :D
I have been watching your videos for a long time and you never seem to get things right about fish. So let me tell you. Everything in fish is done from ~/.config/fish/config.fish. Starting from setting up aliases , abbreviations to defining function. You can source other files for different things but it is the default.
Among us.
amongus
LOL both times in your example you check with '--user' flag only. But the 2nd time i try without the flag. And it does not propagate the stuff in /etc/environment into any system level (non user) systemd environment. if you try 'systemctl show-environment'. it isnt included there! so what is the best solution to fix this silly non-congruent corner cases buggy behavior? Mut we all now manually smlink the /etc/environment into /etc/environment.d/ folder? Why is this featire so utterly jank? You'd have thought they paid the sytemd guys enough money for it? After ibm paying out 34 billion for the whole company? Dear me. It"s pretty laughable
Yeah, everything about systemd is sad really.
I'm trying to figure out how I can create a package in the AUR to make *everything* put its configuration files outside of ~ and it looks like `/etc/security/pam_env.conf` might be the only way