From 9a067f225c955201813cca0c529bfb52f4d130d7 Mon Sep 17 00:00:00 2001 From: Konrad Bucheli Date: Wed, 29 Jan 2025 08:45:14 +0100 Subject: [PATCH] how to sent env variables in the desktop --- user-guide/env_variables.md | 33 +++++++++++++++++++++++++++++++++ user-guide/index.md | 1 + 2 files changed, 34 insertions(+) create mode 100644 user-guide/env_variables.md diff --git a/user-guide/env_variables.md b/user-guide/env_variables.md new file mode 100644 index 00000000..8f2dbcfe --- /dev/null +++ b/user-guide/env_variables.md @@ -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. + + + + + + + diff --git a/user-guide/index.md b/user-guide/index.md index fcbf7407..b1ccbb80 100644 --- a/user-guide/index.md +++ b/user-guide/index.md @@ -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)