I prefer to fill ~/.profile or ~/.bashrc to place my env variables and settings (alias for example). In this way I don't need ~/.login_conf.
The only system in which I configure /etc/login.conf for specific settings like no coredumps, memory, etc. is in OpenBSD.
BR,
Jes
How/where to set global environment variables?
Re: How/where to set global environment variables?
I know about cap_mkdb and that was the first thing I checked when the /etc/login.conf didn't work for a desktop session.
I have since double checked SSH sessions and both the /etc/login.conf and /etc/profile approaches work as expected for these.
So it seems to me that the graphical desktop login process doesn't support either approach
. If it supported /etc/login.conf, the BLOCKSIZE environment variable would be set in a normal user xterm session on a default GhostBSD installation (as that variable is in the default login.conf) but it isn't. That variable is commented out of all the default dot files AFAICS.
I have since double checked SSH sessions and both the /etc/login.conf and /etc/profile approaches work as expected for these.
So it seems to me that the graphical desktop login process doesn't support either approach

-
- Posts: 40
- Joined: Sun Aug 20, 2017 10:08 am
Re: How/where to set global environment variables?
ASX wrote:I'm starting to think you have come across that FreeBSD cap_mkdb(1) obscenity:

Re: How/where to set global environment variables?
[quote="NeverSimple" Not sure if the OP ommited this fine 'post processing utility'...[/quote]
LoL
Hope that imply some irony ! Anyway, yes he wrote he used that fine utility.
LoL


-
- Posts: 40
- Joined: Sun Aug 20, 2017 10:08 am
Re: How/where to set global environment variables?
Irony? No, not at all....ASX wrote:LoL![]()
Hope that imply some irony ! Anyway, yes he wrote he used that fine utility.


I now see that the OP has responded that he used that utility, but his post wasn't there when I posted, although it now looks that way. Weird?
Still kinda,sorta (...) works for me though. If I place the environment variables in /etc/profile, they are available in a fish shell under Xfce, where the variables placed in /etc/login.conf are not.
When I SSH into the box, the situation is the other way around: There I see the varaiables defined in /etc/login.conf, and not the ones I defined in /etc/profile.
Two things:
- There is something different between the OP's situation and mine,
- This gives me a headache...

Re: How/where to set global environment variables?
How do you start Xfce ? May be the difference is in using slim or not ...NeverSimple wrote:Still kinda,sorta (...) works for me though. If I place the environment variables in /etc/profile, they are available in a fish shell under Xfce, where the variables placed in /etc/login.conf are not.
When I SSH into the box, the situation is the other way around: There I see the varaiables defined in /etc/login.conf, and not the ones I defined in /etc/profile.
Two things:
- There is something different between the OP's situation and mine,
- This gives me a headache...
-
- Posts: 40
- Joined: Sun Aug 20, 2017 10:08 am
Re: How/where to set global environment variables?
Standard GhostBSD Xfce installation, so I'm using SlimASX wrote:How do you start Xfce ? May be the difference is in using slim or not ...
Re: How/where to set global environment variables?
Okay, I've finally had a few hours to dig deeper - my findings:
- the FreeBSD port of Slim does grab some capabilities out of /etc/login.conf, but not the setenv capabity
See r379608 for more details.
- I haven't been able to identify any support in LightDM (original source or FreeBSD port) for the capability database.
I have however found a workaround: changing the login command in /usr/local/etc/slim.conf to use the commented out bash invocation (with path modified) rather than the FreeBSD sh invocation seems to result in /etc/profile being read during a graphical login. Using bash works because it has a command option to force operation as a login shell; most other shells (ash seems to be an exception) don't have a command option for this.
Now I'm able to use Octopkg to install things...
- the FreeBSD port of Slim does grab some capabilities out of /etc/login.conf, but not the setenv capabity

- I haven't been able to identify any support in LightDM (original source or FreeBSD port) for the capability database.
I have however found a workaround: changing the login command in /usr/local/etc/slim.conf to use the commented out bash invocation (with path modified) rather than the FreeBSD sh invocation seems to result in /etc/profile being read during a graphical login. Using bash works because it has a command option to force operation as a login shell; most other shells (ash seems to be an exception) don't have a command option for this.
Now I'm able to use Octopkg to install things...