This is the mail archive of the
mailing list for the Cygwin project.
Re: cmd.exe as telnetd login shell: "mode con LINES=24 COLS=80" has no effect..
- From: nicebounce at trodman dot com
- To: cygwin at cygwin dot com
- Date: Tue, 3 Dec 2002 15:23:52 -0600
- Subject: Re: cmd.exe as telnetd login shell: "mode con LINES=24 COLS=80" has no effect..
<why cmd.exe does not "understand" the window size>
I talked to a support person at ataman.com about their
telnetd product. My interpretation is that cmd.exe
has multiple (simultaneous?) modes of operation:
o it can open STDERR/STDIN/STDOUT like a normal character
based application. This is the only mode that cygwin
telnetd or sshd supports.
o cmd.exe can write to a either the primary screen buffer or
the alternate screen buffer. These buffers are some
how associated with a
"set" consisting of the current mouse, clipboard,
keyboard, and video card - the ataman support person
indicated that this "collective unit" was represented
by a virtual facility they instanciate called a "winstation".
I'm sure a badly mundged concepts here, I envite corrections.
Ataman only supports the primary screen buffer, but
in general cmd.exe works as you would hope.
-- Tom Rodman
perl -e 'print unpack("u", "\-\=\$\!R\;V1M86XN8V\]M\"\@\`\`");'
On Fri 11/29/02 9:22 PST "Ross Smith II" wrote:
>The Windows Telnet Service fixes the MORE and DOSKEY problems you describe.
>If you want to disallow external telnet, you could block port 23, and
>require users to ssh in, and then run
>% telnet localhost
>Of course, they'll have to enter their NTLM username/password.
>You could even change their shell to be a shell script containing this
>Can anybody guess why cmd.exe works with the Windows Telnet Service but
>fails with cygwin's ssh or telnet?
>> -----Original Message-----
>> From: firstname.lastname@example.org [mailto:email@example.com]On Behalf
>> Of firstname.lastname@example.org
>> Sent: Friday, November 29, 2002 8:10 AM
>> To: email@example.com
>> Subject: cmd.exe as telnetd login shell: "mode con LINES=24 COLS=80" has
>> no effect..
>> <pls excuse me for restarting/updating my own unanswered thread..>
>> A couple of people that insist on using cmd.exe as their login shell when
>> they telnet or ssh to our w2kserver.
>> When the login shell is set to "/cygdrive/c/winnt/system32/cmd",
>> and "putty" is the telnet client:
>> 1) "more < foo" does not work, it has no clue about
>> the window size.
>> o tried "mode con LINES=24 COLS=80", when I
>> then ran "mode con" it appeared to have "taken",
>> but "more < foo" still did not page correctly
>> o I tried setting LINES to no avail.
>> o tried various combinations of "cmd" switches
>> ( "/X" also "/A", did not try "/Y")
>> 2) I would also like to enable the DOSKEY command history capability,
>> "Up Arrow" literally moves the cursor 1 row up. I tried
>> "doskey /reinstall" - it has no apparent effect.
>> 3) I had to kloosh things to get the backspace to do the
>> "erase" function. I wrapped cmd.exe inside a bash
>> script that did a "stty erase ^H" before it started
>> cmd.exe. Is there a better way?
>> 4) If you set the shell to
>> "/cygdrive/c/winnt/system32/cmd", login
>> and then type "bash --login" to get a bash shell
>> (dumb, but needed sometimes), bash hangs. This
>> is still a mystery. To work around this I
>> always start a bash session after the user exits
>> cmd.exe - see below.
>> Any help or ideas would be welcomed. I'm beginning to lean towards
>> the unhappy position that we will have to use Microsoft's or
>> Ataman's telnetd; I would love to avoid this.
>> Pls understand how very much I *appreciate* the cygwin toolset, and that
>> I'm an ever-so-humble day in day out, sys admin/end user of your tools.
>> For more details on what I did see end of this e-mail.
>> perl -e 'print unpack("u", "\-\=\$\!R\;V1M86XN8V\]M\"\@\`\`");'
>> > 17:15:45 Wed Nov 27 /adm/bin/sys/s
>> > C7MKES109 adm_tsr > grep build /etc/passwd|fold
>> > 17:50:35 Wed Nov 27 /adm/bin/sys/s
>> > C7MKES109 adm_tsr > cat /drv/c/adm/bin/sys/s/cmd_login_shell
>> #!/bin/bash -
>> /bin/stty erase
>> /bin/bash --login
>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting: http://cygwin.com/bugs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html