delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/24/08:55:58

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <1ff86f510801240555k5fc30213ye08c5b39ffc0eee5@mail.gmail.com>
Date: Thu, 24 Jan 2008 08:55:20 -0500
From: "Jerry D. Hedden" <jdhedden AT cpan DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: what's the difference between /dev/tty1 and /dev/console
In-Reply-To: <47987DD7.69849291@dessent.net>
MIME-Version: 1.0
References: <daa21e7b0801240138y47744599j44d614f739d3cbe3 AT mail DOT gmail DOT com> <47987DD7 DOT 69849291 AT dessent DOT net>
X-Google-Sender-Auth: 154cd5fdf6674b1d
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Yue Chen wrote:
> I have two hosts installed with cygwin. When I click the cygwin icon
> on host1, the prompt CLI window's tty is /dev/console. However, when I
> click the icon on host2, the CLI window's tty turns to be /dev/tty1.
> In the first window, all windows applications run very well. But in
> the /dev/tty1 window, some windows application can not run
> successfully. Does any one know why?

Brian Dessent wrote:
> /dev/console means that the session is running in a real Windows
> console.
>
> /dev/tty1 means that the session is running attached to a pty
> (pseudoterminal) which is emuated by Cygwin.
>
> Since ptys are an emulated concept that don't exist in Windows,
> non-Cygwin programs get confused by them because they think their output
> is a pipe and not an interactive session.
>
> If you use any terminal but the stock Windows console (i.e. rxvt, xterm,
> ssh connection) or you have "tty" in your CYGWIN environment variable
> you always get  a pty.  The only time you get a console is when you
> don't have "tty" set and you invoke bash from a real Windows console.

I'm not so knowledgable on this subject, so forgive my ignorance.

I run bash from rxvt:

> ps
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
    19992       1   19992      19992  con 78809 08:22:53 /usr/bin/rxvt
    32960   19992   32960      61760    0 78809 08:22:53 /usr/bin/bash
    19292   32960   19292      33136    0 78809 08:43:42 /usr/bin/ps

It's started using via a shell shortcut using the target:
    "C:\cygwin\bin\rxvt.exe -e bash --login"
Doesn't this show that the rxvt window is a console?

I also noted in 'man rxvt':
       -C     Capture system console messages.
When I add it to the above, every window opened is also a console.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019