how to sent env variables in the desktop

This commit is contained in:
2025-01-29 08:45:14 +01:00
parent fef17b258a
commit 9a067f225c
2 changed files with 34 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# Set Environment Variables for the Desktop
The usual place to set environment variables is `~/.bashrc`, but these variables influence only shell sessions, not all desktop programs.
To influence all user spawned processes, you might add one or more `*.conf` files into
`~/.config/environment.d/`.
Following example (`~/.config/environment.d/swiss.conf`) keeps all texts in original English, but changes date/date/paper sizes and other formating elements to what is usual locally in Switzerland:
```
LC_ADDRESS=de_CH.UTF-8
LC_NAME=de_CH.UTF-8
LC_MONETARY=de_CH.UTF-8
LC_PAPER=de_CH.UTF-8
LC_IDENTIFICATION=de_CH.UTF-8
LC_TELEPHONE=de_CH.UTF-8
LC_MEASUREMENT=de_CH.UTF-8
LC_TIME=de_CH.UTF-8
LC_COLLATE=C
LC_NUMERIC=de_CH.UTF-8
```
See the [manual](https://www.freedesktop.org/software/systemd/man/latest/environment.d.html#Configuration%20Format) about more details of the configuration format.
Also be aware you need to have these files locally in your home directory, you cannot use links to your `U:`-drive from the ["Partially Shared Home"-feature](partially_shared_home) because they are not availabe so early in the session setup process.
Note this does not work on RHEL7.
+1
View File
@@ -15,6 +15,7 @@ This guide contains tricks and recipies for end users using Red Hat Enterprise L
- [RDP Access to winterm4(Windows)](https://psi.service-now.com/kb_view.do?sys_kb_id=c3fc386e8788dd10bc150d830cbb358a&sysparm_language=en&sysparm_nostack=true&sysparm_no_create_incident=&sysparm_no_rating=&sysparm_no_suggest=&sysparm_no_update=)
- SSH asks to accept key on unknown host -> [SSH Host Key Certificates](ssh_host_key_certificates)
- [SSH Client Configuration](ssh_client_config)
- How to [Set Environment Variables for the Desktop](env_variables)
- Firefox refuses to start with home directory on the network drive -> [Per Host Default Profile for Firefox](firefox_profile_per_host)
- [Kerberos for Long Running Programs/Simulations/Shell Sessions](kerberos_lifetime)
- [Start Long Running Programs/Simulations with mpirun](mpirun)