unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Terminal problem in shell mode
@ 2003-04-21 23:15 Glenn Ammons
  2003-04-22 18:43 ` Kai Großjohann
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Ammons @ 2003-04-21 23:15 UTC (permalink / raw)


I am running GNU Emacs 21.2.1 on a Windows XP machine, and using the
cygwin bash (2.05b.0(9)-release) as my shell in shell-mode.  The
problem is that when I try to run scp (for example):

        scp foo ammons@bar:/tmp/baz

I get an error message like

        bash: [4828: 1] tcsetattr: Not a typewriter

and scp is stopped in the background.  Emacs sets TERM to "emacs",
which is not in c:/cygwin/etc/termcap; I have tried setting TERM to
"dumb" in my .bash_profile, but that didn't work.

I've never had this problem on Unix boxes.  Does anyone have a fix for
this behavior?

Thanks.
--glenn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-21 23:15 Terminal problem in shell mode Glenn Ammons
@ 2003-04-22 18:43 ` Kai Großjohann
  2003-04-23  0:12   ` Glenn Ammons
  0 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2003-04-22 18:43 UTC (permalink / raw)


Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:

> I am running GNU Emacs 21.2.1 on a Windows XP machine, and using the
> cygwin bash (2.05b.0(9)-release) as my shell in shell-mode.  The
> problem is that when I try to run scp (for example):
>
>         scp foo ammons@bar:/tmp/baz
>
> I get an error message like
>
>         bash: [4828: 1] tcsetattr: Not a typewriter

The problem is that the shell init file(s) in ~ammons on the host bar
try to run stty or suchlike.

Tell them not to do that.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-22 18:43 ` Kai Großjohann
@ 2003-04-23  0:12   ` Glenn Ammons
  2003-04-23  6:14     ` Kai Großjohann
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Ammons @ 2003-04-23  0:12 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:
> 
> > I am running GNU Emacs 21.2.1 on a Windows XP machine, and using the
> > cygwin bash (2.05b.0(9)-release) as my shell in shell-mode.  The
> > problem is that when I try to run scp (for example):
> >
> >         scp foo ammons@bar:/tmp/baz
> >
> > I get an error message like
> >
> >         bash: [4828: 1] tcsetattr: Not a typewriter
> 
> The problem is that the shell init file(s) in ~ammons on the host bar
> try to run stty or suchlike.

But, I haven't even entered my password at this point.  Does the
init file on bar run _before_ I'm authenticated?  If so, that seems
strange.

--glenn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-23  0:12   ` Glenn Ammons
@ 2003-04-23  6:14     ` Kai Großjohann
  2003-04-23 13:30       ` Glenn Ammons
  0 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2003-04-23  6:14 UTC (permalink / raw)


Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:

> But, I haven't even entered my password at this point.  Does the
> init file on bar run _before_ I'm authenticated?  If so, that seems
> strange.

Oh, this is before the password prompt?  Then disregard this.

So it must be the scp on the local side that's trying to frob the
terminal.

I think you said that you can call scp outside of Emacs without the
message?  What does `tty' say in a shell where scp works?  And what
does `tty' say in a shell where scp produces the above output?

What happens if you invoke scp as `cat | scp ...'?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-23  6:14     ` Kai Großjohann
@ 2003-04-23 13:30       ` Glenn Ammons
  2003-04-23 16:37         ` Benjamin Riefenstahl
  2003-04-23 16:41         ` Kai Großjohann
  0 siblings, 2 replies; 9+ messages in thread
From: Glenn Ammons @ 2003-04-23 13:30 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

[snip]

> So it must be the scp on the local side that's trying to frob the
> terminal.
> 
> I think you said that you can call scp outside of Emacs without the
> message?

Yes.

>  What does `tty' say in a shell where scp works? 

In a cygwin shell (Windows XP), it says /dev/conin.

> And what does `tty' say in a shell where scp produces the above
> output?

In shell-mode (NTEmacs on Windows XP), it says

  not a tty

That's interesting.  On another machine (XEmacs on Linux), it says

  /dev/pts/4

> What happens if you invoke scp as `cat | scp ...'?

About the same thing.  I only get the message

  tcsetattr: Not a typewriter

in shell-mode in NTEmacs.

So, how do I convince shell-mode on NTEmacs that it is a tty?

Thanks.
--glenn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-23 13:30       ` Glenn Ammons
@ 2003-04-23 16:37         ` Benjamin Riefenstahl
  2003-04-23 16:41         ` Kai Großjohann
  1 sibling, 0 replies; 9+ messages in thread
From: Benjamin Riefenstahl @ 2003-04-23 16:37 UTC (permalink / raw)


Hi Glenn,

Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:
> In shell-mode (NTEmacs on Windows XP), it says
> 
>   not a tty
> 
> [...]
>
> So, how do I convince shell-mode on NTEmacs that it is a tty?

You don't.  Emacs uses pseudo-ttys on Unix to do that, but Windows
doesn't have that feature natively.

scp shouldn't usually require a tty though (it doesn't for me, using
OpenSSH_3.5p1).  I'd say you need to find the bit that does require
the tty and remove it.

so long, benny

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-23 13:30       ` Glenn Ammons
  2003-04-23 16:37         ` Benjamin Riefenstahl
@ 2003-04-23 16:41         ` Kai Großjohann
  2003-04-23 21:16           ` Glenn Ammons
  1 sibling, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2003-04-23 16:41 UTC (permalink / raw)


Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:

> So, how do I convince shell-mode on NTEmacs that it is a tty?

Emacs has the concept of a process connection type.  See the variable
process-connection-type.  Does this help?
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-23 16:41         ` Kai Großjohann
@ 2003-04-23 21:16           ` Glenn Ammons
  2003-04-24 16:39             ` Kai Großjohann
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Ammons @ 2003-04-23 21:16 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:
> 
> > So, how do I convince shell-mode on NTEmacs that it is a tty?
> 
> Emacs has the concept of a process connection type.  See the variable
> process-connection-type.  Does this help?

No, I think Benny is right about Windows.  process-connection-type is
t for shell-mode on both Windows and Unix; apparently, on Unix, Emacs
communicates with bash through a pty, but on Windows it uses a pipe,
since there are no ptys.

What a bummer.  It's tough getting a decent command-line on Windows.

--glenn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Terminal problem in shell mode
  2003-04-23 21:16           ` Glenn Ammons
@ 2003-04-24 16:39             ` Kai Großjohann
  0 siblings, 0 replies; 9+ messages in thread
From: Kai Großjohann @ 2003-04-24 16:39 UTC (permalink / raw)


Glenn Ammons <ammons@salsa.cs.wisc.edu> writes:

> What a bummer.  It's tough getting a decent command-line on Windows.

I've heard stuff about Cygwin.  It's not easy to get Cygwin apps to
interoperate with non-Cygwin apps.

Maybe MingW is a better approach?  It provides GNU apps ported to
Windows.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-04-24 16:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-21 23:15 Terminal problem in shell mode Glenn Ammons
2003-04-22 18:43 ` Kai Großjohann
2003-04-23  0:12   ` Glenn Ammons
2003-04-23  6:14     ` Kai Großjohann
2003-04-23 13:30       ` Glenn Ammons
2003-04-23 16:37         ` Benjamin Riefenstahl
2003-04-23 16:41         ` Kai Großjohann
2003-04-23 21:16           ` Glenn Ammons
2003-04-24 16:39             ` Kai Großjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).