Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH: avoiding setlocale warning on remote hosts #406

Closed
serasset opened this issue Nov 12, 2021 · 2 comments
Closed

SSH: avoiding setlocale warning on remote hosts #406

serasset opened this issue Nov 12, 2021 · 2 comments

Comments

@serasset
Copy link

Describe the solution you'd like?

Preferences should allow me to disable environment variable transmission to the remote host when connecting with ssh.

A better solution could be to "translate" macos local names to the remote host locale names.

Is your feature request related to a problem? Please describe.

Each time I connect to a linux host from my Mac, I get a warning : 

`setlocale : LC_CTYPE : impossible de changer le paramètre de langue (UTF-8) : Aucun fichier ou dossier de ce type`

This happens using ssh or /usr/bin/ssh

This is a well known "feature" of ssh who sends the environment variable LANG and LC_* from macos to linux and sets LC_CTYPE to UTF-8 which is unknown on linux.

Usual workaround in Terminal.app and iTerm2 includes disabling the environment variable transmission in preferences and setting the locale in the remote .bashrc or rely on the default configuration.

Additional context

An example of workaround site : https://en.stealthsettings.com/fix-macos-terminal-error-warning-setlocale-lc_ctype-change-locale-utf-8-file-directory.html

Most solutions are somehow based on disabling SendEnv on ssh_config level (requires root superpowers) or setting the prefs in Terminal.app or iTerm2

@tekumara
Copy link

On macOS I'm getting:

ssh remote
...
bash: warning: setlocale: LC_ALL: cannot change locale (en_AU.UTF-8)

This helps

LC_ALL=C.UTF-8 ssh remote

@elviskahoro
Copy link
Member

Subscribe to (this is where we'll share SSH updates):

I've moved this issue to our dedicated SSH discussion:

  • SSH Support V1 #502
    This helps us keep things organized and makes it easy to see and discuss all our SSH Bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants