You are not logged in.

#1 2025-07-17 22:59

Durhammer
Member
Registered: 2025-01-28
Posts: 230

Setting environment variables at startup -- where? [SOLVED]

I'm trying to set up some generated and exported environment variables in Q4OS that can be used within applications (such as conky). I'm using JWM and it seems that the startup code in .jwmrc does not allow environment variables to be set/exported. Ditto for the Q4OS_TDE_Startup script. So where CAN global user-defined environment variables be set without having to muck with system files?

(See last page for solution.)

Last edited by Durhammer (2025-07-19 14:52)

Offline

#2 2025-07-18 06:17

hchiper
Member
From: Belgium
Registered: 2020-07-28
Posts: 790

Re: Setting environment variables at startup -- where? [SOLVED]

I don't know if there is something special with JWM, you should ask on its forum.
Otherwise the right place would be $HOME/.bashrc
I also recommend you to search the web: there is a huge amount of excellent tutos about environment variables and the `export` command.


Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD

Offline

#3 2025-07-19 14:51

Durhammer
Member
Registered: 2025-01-28
Posts: 230

Re: Setting environment variables at startup -- where? [SOLVED]

Thanks, @hchiper!

While I should have remembered that place, even it wouldn't have mattered. Turns out the code I was using to discover the stuff to put into environment variables can't work in non-display shell. I had to change the code to launch a terminal to run the code inside the terminal and then exit. Of course, that also meant more complexity in getting the environment variables set above that terminal invocation, so I just switched to using .files in place of the variables.

I do know a few things, FWIW. smile

Offline

Board footer

Powered by FluxBB