Is /etc/environment.d/*.conf a valid place to put environment config on Ubuntu 18.04 for all users?
I've tried a file with the following contents:
BRAD_TEST=trueHowever, after logging in and running env, this variable does not appear to be set in the environment. Even after a reboot, it wasn't there.
Two questions:
- Is this feature of systemd enabled in Ubuntu 18.04?
- Does this feature allow setting environment for all users, or is it intended for another purpose?
1 Answer
Ok after rebooting my system today I got it to work but I followed the recommended naming style for such files and this 60-foo.conf is the name I gave to the file and I also had to create that folder and it was called environment.d and of course it was placed in the /etc folder.
This is the content of that file:
FOO_DEBUG=force-software-gl,log-verboseAfter the reboot doing echo $FOO_DEBUG produced the contents of that file:
force-software-gl,log-verboseNote several things here:
- Filename follows convention as found in the man pages