Networking Forums

Networking Forums > Computer Networking > Linux Networking > stty: standard input: Invalid argument

Reply
Thread Tools Display Modes

stty: standard input: Invalid argument

 
 
Christian Christmann
Guest
Posts: n/a

 
      10-10-2006, 01:41 PM
Hi,

when I run an application via ssh like
"ssh HOSTNAME xterm" I get the ssh warning:
"stty: standard input: Invalid argument".

Any ideas how to get rid of it?

Regards,
Chris
 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a

 
      10-10-2006, 02:02 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Christian Christmann wrote:
> Hi,
>
> when I run an application via ssh like
> "ssh HOSTNAME xterm" I get the ssh warning:
> "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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12

iD8DBQFFK6gFagVFX4UWr64RAqxhAJ9JRh8Xirz1jHa6y/jUbDbTxg69jgCeNiaE
SRjVY6ba0Bf10vPAWKxnbjw=
=JlXT
-----END PGP SIGNATURE-----

 
Reply With Quote
 
Chris Davies
Guest
Posts: n/a

 
      10-10-2006, 10:30 PM
Christian Christmann wrote:
>> when I run an application via ssh like
>> "ssh HOSTNAME xterm" I get the ssh warning:
>> "stty: standard input: Invalid argument".


Lew Pitcher <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: RTNETLINK answers: Invalid argument when adding route... help! Pascal Hambourg Linux Networking 0 11-17-2009 09:36 AM
Re: RTNETLINK answers: Invalid argument when adding route... help! Pascal Hambourg Linux Networking 0 11-17-2009 09:20 AM
Settle an argument Tx2 Broadband 12 11-28-2006 11:15 AM
IPSEC tunnel fails with "pfkey UPDATE failed: Invalid argument" George Linux Networking 1 09-29-2005 02:40 PM
iptables - "invalid argument" error ? martin02 Linux Networking 4 10-05-2003 08:47 PM



1 2 3 4 5 6 7 8 9 10 11