Pseudo-terminal will not be allocated because stdin is not a terminal.

View: New views
4 Messages — Rating Filter:   Alert me  

Pseudo-terminal will not be allocated because stdin is not a terminal.

by Csaba Raduly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I'm about to pack my bags and move from 1.5 to 1.7 (CYGWIN_NT-6.0
EV0017A4D11749 1.7.0(0.217/5/3) 2009-11-03 15:06 i686 Cygwin) on Vista
SP1, but one thing got me stumped.

I log in to different machines (e.g. lab1) via SSH. For this purpose I
created a number of desktop shortcuts, like this:
Target: C:\cygwin\bin\run.exe rxvt --geometry 170x60+0+0 -e ssh -Y lab1
Start in: C:\cygwin\bin

These work fine.

So I created a copy of this shortcut and edited it to
Target: C:\cygwin17\bin\run.exe rxvt --geometry 170x60+0+0 -e ssh -Y lab1
Start in: C:\cygwin17\bin

When I double-click the shortcut to 1.7, the rxvt window comes up but
the above error message (Pseudo-terminal will not be allocated because
stdin is not a terminal.) is displayed at the top and
* the prompt does not appear although I can type commands
* DISPLAY is not set correctly
* joe does not run (Couldn't load termcap/terminfo entry), necause
TERM is not set
* vim displays a warning:
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal

and so on and so forth.

Here's a diff between the environment in lab1 after login via 1.5 and 1.7:

--- envronment.1.5      2009-11-05 16:10:46.000000000 +0100
+++ envronment.1.7      2009-11-05 16:10:27.000000000 +0100
@@ -7,23 +7,21 @@
 XKEYSYMDB=/usr/share/X11/XKeysymDB
 HOST=lab1
-TERM=xterm
 SHELL=/bin/bash
 PROFILEREAD=true
 HISTSIZE=1000
 CVSROOT=......
 MORE=-sl
 QTDIR=/usr/lib/qt3
-SSH_TTY=/dev/pts/41
 GROFF_NO_SGR=yes
-LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:
+LS_COLORS=
 XNLSPATH=/usr/share/X11/nls
 ENV=/etc/bash.bashrc
 HOSTTYPE=x86_64
@@ -74,13 +72,12 @@
 CVS_RSH=ssh
 XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/etc/opt/kde3/share/:/opt/kde3/share/:/opt/gnome/share/
 ACLOCAL_FLAGS=-I /opt/gnome/share/aclocal
 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/opt/kde3/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/share/pkgconfig
 LESSOPEN=lessopen.sh %s
 CVSEDITOR=/usr/bin/joe -nobackups
 INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/opt/gnome/share/info
-DISPLAY=localhost:16.0
-XAUTHLOCALHOSTNAME=lab1
+DISPLAY=:0.0
 LESSCLOSE=lessclose.sh %s %s
 G_BROKEN_FILENAMES=1

I thought maybe it's some environment difference problem, but changing
the shortcut like this didn't help:
Target: C:\cygwin\bin\run.exe rxvt --geometry 170x60+0+0 -e bash
--login -c 'ssh -Y lab1'


If I start the local 1.7 Cygwin prompt from another shortcut:
Target: C:\cygwin17\bin\run.exe rxvt.exe --geometry 170x60+0+0 -e
/bin/bash --login
Start in: C:\cygwin17\bin

and then type "ssh -Y lab1", then it works (TERM and DISPLAY are set,
prompt appears, etc)

Any ideas ? (I used up mine).

The fork behavior of 1.5 and 1.7 appears to be different:
In 1.5, rxvt spawns another rxvt, which spawns ssh; then the second rxvt exits:

Name                             Pid Pri Thd  Hnd      VM      WS    Priv
rxvt                            6116   8   4  110  443164    5472    3712
ssh                             5448   8   5  147  449716    6320    3704

In 1.7, the second rxvt sticks around:
rxvt                            5932   8   4  127  444184    6288    4736
  rxvt                          3124   8   2   87  431304    3944    3632
    ssh                         5748   8   5  169  449540    6200    3700

Csaba
--
Life is complex, with real and imaginary parts

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Pseudo-terminal will not be allocated because stdin is not a terminal.

by Corinna Vinschen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov  6 13:53, Csaba Raduly wrote:

> Hi all,
> I'm about to pack my bags and move from 1.5 to 1.7 (CYGWIN_NT-6.0
> EV0017A4D11749 1.7.0(0.217/5/3) 2009-11-03 15:06 i686 Cygwin) on Vista
> SP1, but one thing got me stumped.
>
> I log in to different machines (e.g. lab1) via SSH. For this purpose I
> created a number of desktop shortcuts, like this:
> Target: C:\cygwin\bin\run.exe rxvt --geometry 170x60+0+0 -e ssh -Y lab1
> Start in: C:\cygwin\bin
>
> These work fine.
>
> So I created a copy of this shortcut and edited it to
> Target: C:\cygwin17\bin\run.exe rxvt --geometry 170x60+0+0 -e ssh -Y lab1
> Start in: C:\cygwin17\bin
>
> When I double-click the shortcut to 1.7, the rxvt window comes up but
> the above error message (Pseudo-terminal will not be allocated because
> stdin is not a terminal.) is displayed at the top and
> * the prompt does not appear although I can type commands
> * DISPLAY is not set correctly
> * joe does not run (Couldn't load termcap/terminfo entry), necause
> TERM is not set
> * vim displays a warning:
> Vim: Warning: Output is not to a terminal
> Vim: Warning: Input is not from a terminal

I tried this, too, and I can't reproduce it.  Is it possible that,
when you copied the desktop shortcut, you didn't fix the "Start In:"
directory in the shortcut, so that it still points to the Cygwin 1.5
bin directory?  In that case you have different processes running
under different Cygwin DLLs within the same session, which is not
going to work as expected.


Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Pseudo-terminal will not be allocated because stdin is not a terminal.

by Csaba Raduly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 6, 2009 at 2:21 PM, Corinna Vinschen
<corinna-cygwin@...> wrote:

> On Nov  6 13:53, Csaba Raduly wrote:
>>
>> I log in to different machines (e.g. lab1) via SSH. For this purpose I
>> created a number of desktop shortcuts, like this:
>> Target: C:\cygwin\bin\run.exe rxvt --geometry 170x60+0+0 -e ssh -Y lab1
>> Start in: C:\cygwin\bin
>>
>> These work fine.
>>
>> So I created a copy of this shortcut and edited it to
>> Target: C:\cygwin17\bin\run.exe rxvt --geometry 170x60+0+0 -e ssh -Y lab1
>> Start in: C:\cygwin17\bin
-------------^^^^^^^^^^^^^^^

>
> I tried this, too, and I can't reproduce it.  Is it possible that,
> when you copied the desktop shortcut, you didn't fix the "Start In:"
> directory in the shortcut, so that it still points to the Cygwin 1.5
> bin directory?

No, I did change the "Start in" directory (the information was
copy-pasted from the shortcut properties).

In fact, C:\cygwin17\bin\run.exe started in C:\cygwin appears to work
better (probably because the Cygwin 1.7 run.exe launches the Cygwin
1.5 rxvt and ssh). Now the prompt appears but the tunneled X doesn't
work (which is as expected, because the X server is now from Cygwin
1.7)

--
Life is complex, with real and imaginary parts

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Pseudo-terminal will not be allocated because stdin is not a terminal.

by Csaba Raduly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A closer look at Process Explorer revealed the cause of the problem:

rxvt.exe 3732 8 444,184 K 4,740 K 6,332
K me 1,630 C:\cygwin17\bin\rxvt.exe --geometry 170x60+0+0 -e ssh -Y
lab1
 rxvt.exe 5276 8 431,304 K 3,628 K 3,940 K me 1,023 C:\cygwin17\bin\rxvt.exe
  ssh.exe 8640 8 449,540 K 3,704 K 6,224
K me 1,807 C:\cygwin\bin\ssh.exe -Y lab1

It was running the ssh from Cygwin 1.5 !
It is true that c:\cygwin\bin is in the Windows path although I don't
understand why rxvt didn't pick its own ssh. I assume rxvt wasn't
started in C:\cygwin17\bin (the shortcut launched
C:\cygwin17\bin\run.exe in C:\cygwin17)

The easy fix is to make sure rxvt launches its own ssh by supplying an
absolute path:
Target: C:\cygwin17\bin\run.exe rxvt --geometry 170x60+0+0 -e
/usr/bin/ssh -Y lab1

Csaba
--
Life is complex, with real and imaginary parts

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple