Post by Christian Christmann
Hi,
when I run an application via ssh like
"stty: standard input: Invalid argument".
Any ideas how to get rid of it?
Yes.
Look through the various profile scripts that you execute when you log
on, and change the stty commands to redirect their stderr to /dev/null
("2>/dev/null") . Pseudo-ttys, like the one that ssh uses, don't
support some of the system calls (IOCTLs, etc) that stty uses, and stty
will report on any such problems that it encounters. Directing those
error messages to /dev/null lets the stty command do the proper thing
when you log on to a direct-attached terminal, and not disturb you when
you log on through ssh.
HTH
- --
Lew Pitcher
Post by Lew Pitcher
Post by Christian Christmann
when I run an application via ssh like
"stty: standard input: Invalid argument".
Look through the various profile scripts that you execute when you log
on, and change the stty commands to redirect their stderr to /dev/null
("2>/dev/null") [...]
Alternatively, only execute stuff that requires a terminal if there's
really a terminal attached.
This is the sort of thing I have in files such as .profile:
if test -n "$PS1"
then
# Interactive stuff
#
stty blah blah blah
set -o vi
export EDITOR='vi'
export PAGER='less'
...
fi
In case you're wondering how it works, PS1 is the shell prompt and is set
only for an "interactive" shell. An "interactive" shell is determined
to be one that's attached to a terminal (or pseudo-tty). Conveniently,
ssh attaches a terminal only if it's running interactively, so it all
matches up.
Chris