Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LANG envvar in TCSH

10 views
Skip to first unread message

Kenneth Brun Nielsen

unread,
Jan 30, 2015, 8:25:47 AM1/30/15
to
I'm using danish keyboard including the keys æ,ø,å.

On my local machine I have LANG=en_US.utf8 and everything works fine in terminal (Gnome-terminal invoking BASH) - I can even press the special keys above in the terminal and they respond as expected, despite the fact that they rarely makes sense in terminal:)

In my work place, I remotely SSH login to a server (Centos 5.7), where the primary (proprietary) software requires LANG=C and TCSH. This has the very annoying side effect, that if I accidentally hit one of the above keys, then the terminal "freezes" until I pressed a sequence of 14 random key presses (I usually tap on 'space' until it unfreezes). When it finally unfreezes, it responds with the code \303.

How can I fix this? It can easily be fixed by setting LANG=en_US.utf8 (or using BASH), but this will require me to start the program with: 'setenv LANG C && appname'. This is not a big deal, but only problem is that I might not be able to foresee all consequences.

Any other suggestions on how to avoid this annoying "freeze state"? Obviously I prefer to keep my danish keyboard, because I have ~25 years of experience with it - and it's preferable to have the keys when writing my native language :)

Best regards,
Kenneth

Kaz Kylheku

unread,
Jan 30, 2015, 9:57:05 AM1/30/15
to
On 2015-01-30, Kenneth Brun Nielsen <kenneth.br...@gmail.com> wrote:
> It can easily be fixed by ... (or using BASH)

That's it then.

tcsh is dumb mistake in the history of OSS. Get rid of it completely from the
target system if you can.

> but this will require me to
> start the program with: 'setenv LANG C && appname'

In the "or using BASH" case, it's just:

LANG=C appname

This sets up the LANG=C environment binding just for that program, not
for the current shell, where LANG retains its previous value, if it has one.

If you have control over the account you're using no that server, maybe you can
just change its login shell to bash, and set up an alias in a .bash_profile.

alias appname='LANG=C appname'

> This is not a big deal,
> but only problem is that I might not
> be able to foresee all consequences.

It would be astonishing if the app cared what shell executable is its parent,
as long as its environment is otherwise identical. You never know in software,
though, so you're right to be paranoid.

Charles Polisher

unread,
Jan 30, 2015, 11:29:08 AM1/30/15
to
On 2015-01-30, Kenneth Brun Nielsen <kenneth.br...@gmail.com> wrote:

> I'm using danish keyboard including the keys æ,ø,å.

> On my local machine I have LANG=en_US.utf8 and everything
> works fine in terminal (Gnome-terminal invoking BASH) - I can
> even press the special keys above in the terminal and they
> respond as expected, despite the fact that they rarely makes
> sense in terminal:)

> In my work place, I remotely SSH login to a server (Centos
> 5.7), where the primary (proprietary) software requires LANG=C
> and TCSH. This has the very annoying side effect, that if I
> accidentally hit one of the above keys, then the terminal
> "freezes" until I pressed a sequence of 14 random key presses (I
> usually tap on 'space' until it unfreezes). When it finally
> unfreezes, it responds with the code \303.

> How can I fix this? It can easily be fixed by setting
> LANG=en_US.utf8 (or using BASH), but this will require me to
> start the program with: 'setenv LANG C && appname'. This is not
> a big deal, but only problem is that I might not be able to
> foresee all consequences.

Perhaps xmodmap to translate the keycodes into something benign..

> Any other suggestions on how to avoid this annoying "freeze
> state"? Obviously I prefer to keep my danish keyboard, because I
> have ~25 years of experience with it - and it's preferable to
> have the keys when writing my native language :)

Best regards,
--
Charles
0 new messages