[X2Go-Dev] Bug#282: Bug#282: Use client-side LANG + LC_* settings in server session

Mihai Moldovan ionic at ionic.de
Sun Nov 23 22:51:36 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 02.08.2013 09:39 am, Mike Gabriel wrote:
> When I use a terminal shell emulator (konsole, xfce-emulator, etc) on the
> remote (server x2go), non-ascii characters (accented characters, for
> instance) are not well printed.
>
> The same thing happened when I ssh'ed to the same machine without "SendEnv
> LANG LC_*" in /etc/ssh/ssh_config. Adding this again solved the question.
>
> Executing locale on server terminal emulator results in all "POSIX", except
> for LANG which is not set.

This is strictly speaking NOT an x2go bug, but the way shells work.

We can workaround this using Mike's proposal and I'd second this.

Technical details: x2go connects via SSH and runs shell scripts. Those spawned
shells are non-interactive due to the fact that any of standard output or
standard error are not connected to a terminal.

(man bash: "An interactive shell is one started without non-option arguments and
without the -c option whose standard input and error are both connected to
terminals (as determined by isatty(3)), or one started with the -i option."
A non-interactive shell is therefore (-i option aside) a shell started with
non-option arguments or with the -c option or whose standard input or error are
not connected to terminals.)

POSIX definitions (
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html ) do not
require a shell to read any file at startup, but won't forbid it. This is simply
not mentioned at all.

bash enters POSIX conformity mode when started as "sh" and will *not* read any
files on startup. This is especially true for /etc/profile.

If it is spawned as "bash" in non-POSIX conformity mode, it will still *not*
read /etc/profile for non-interactive shells.


Mihai
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJUclbmAAoJEB/WLtluJTqHWtgP/i/ab6XrMlbKXMe7TOFTF/Og
92+c2wdmMj3T99JrC9v+qGnqdAukh3tFv6k5FTxcXH+5tDOMhi4isnNTlJTnAnOe
hbr2F8qo4KgPBFMXbr97KgIVUzQXgl/aBdjIxLuWv6BPKvXUVpzzqSpODyG9JDSp
zCBaQCv2z90Qb1t8MjEhtbF4yA0tYd9+3j7jh0EbRzocVW8BRQaO3D1YTjQiKkHk
rhzr8CqbytPabhkW6IFrnwaATS6pst62uB2jvJFeXNJ44BNZNqin0Gm0pKOaE1BU
IoW8Ds274JyrC5ZR5FifDAXA8h6MxVZEdJiQUe1hko16LCtW4r82Ba7bc1Un1STv
pb5E6se+OMRQ9dbz+JfuQnCpS1mE5ZlbZQ1t8JH9oqi07FaienXBUDNIyiCviddG
hI+cF7W6X/cclzF//SDZ5Gck43qBy8njcX2PPViuXJ6hlXDw18/CmcpBxxMPj2V+
I1HsrBWZJ0k1fItKOKg/6uOlTSnJGiZAD2ulqmwltZEgplDf/OiysIxflM9XfgrJ
FnYc+mz4xmFXnUg2NPsccEXob+nDmMl5dikaIFNZpd5mmHAxRlOkBzvfs6af/3u/
TUO4qNrjGSyvJ4RGb2FPbbE+nS3kproltIwYU4OqLMd7fYRWTwL/8SuIlgoi/+7C
HBb0dLVOwxCqOGl0PtMb
=Yv28
-----END PGP SIGNATURE-----


More information about the x2go-dev mailing list