Computing : Language settings in interactive/ssh sessions

If you connect by `ssh` to a workgroup server or start into an interactive Condor job, your language settings will normally be forwarded to the sessions as well. I.e., your session's time and other language settings should be available in the remote interactive session as usual.

Displaying the current language settings

On Linux to view your current interactive session's language related settings, run `locale`

Example for locale settings - here english with danish units as presets

> locale

LANG=en_DK.utf8
LC_CTYPE="en_DK.utf8"
LC_NUMERIC="en_DK.utf8"
LC_TIME="en_DK.utf8"
LC_COLLATE="en_DK.utf8"
LC_MONETARY="en_DK.utf8"
LC_MESSAGES="en_DK.utf8"
LC_PAPER="en_DK.utf8"
LC_NAME="en_DK.utf8"
LC_ADDRESS="en_DK.utf8"
LC_TELEPHONE="en_DK.utf8"
LC_MEASUREMENT="en_DK.utf8"
LC_IDENTIFICATION="en_DK.utf8"
LC_ALL=en_DK.utf8


Settings forwarded with ssh

By default, ssh will forward a number of location variables to the remote session so that the local and remote session have the same "look & feel".

You can check, which settings are forardded and set, by running `ssh` with the -G flag - which will dump yoo a long list of the active values `ssh` is using in its variables. Look for variable names as from `locate` to see, if these are forwarded with `sendenv`

Example: ssh active configuration variables

> ssh -G YOURUSERNAME@HOSTNAME.desy.de
...

sendenv LANG
sendenv LC_*
sendenv LANG
sendenv LC_*
sendenv LANG
sendenv LC_CTYPE
sendenv LC_NUMERIC
sendenv LC_TIME
sendenv LC_COLLATE
sendenv LC_MONETARY
sendenv LC_MESSAGES
sendenv LC_PAPER
sendenv LC_NAME
sendenv LC_ADDRESS
sendenv LC_TELEPHONE
sendenv LC_MEASUREMENT
sendenv LC_IDENTIFICATION
sendenv LC_ALL
sendenv LANGUAGE

...

Unsetting variables

If you need due to some reason another location setting in your remote interactive session, you can either change/unset these in the remote session or tell ssh to set such a variable to something else on a per host base

Example: per host changing forwarded environment variables in ${HOME}/.ssh/config

~~> ${HOME}/.ssh/config

Host somehost.desy.de
  SendEnv LC_EXAMPLE=SomethingElse