Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 27 Nov 2002 18:00:27 -0600 From: nicebounce AT trodman DOT com Message-Id: <200211280000.gAS00RO12845@tigris.pounder.sol.net> X-Authentication-Warning: tigris.pounder.sol.net: rodmant set sender to nicebounce AT trodman DOT com using -f To: cygwin AT cygwin DOT com X-note: 1G0!G/usr/sbin/sendmail -v -t -fnicebounce AT trodman DOT com # for less traceable mail Subject: usg cmd.exe as login shell: "more" not sensing #LINES; how2 enable history.. Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII -------- Hello: There are a couple of people in our group that insist on using cmd.exe as their login shell when they telnet or ssh to our windows 2000 server. When the login shell is set to "/cygdrive/c/winnt/system32/cmd" here are the challenges: 1) "more < foo" does not work, it has no clue about the window size. I tried setting LINES to no avail. 2) I would line to enable the command history capability, so that up and down arrow step through the history. Any ideas? 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. For more details on what I did see end of this e-mail. -- thanks/ regards, Tom perl -e 'print unpack("u", "\-\=\$\!R\;V1M86XN8V\]M\"\@\`\`");' --v-v------------------C-U-T---H-E-R-E-------------------------v-v-- > 17:15:45 Wed Nov 27 /adm/bin/sys/s > C7MKES109 adm_tsr > grep build /etc/passwd|fold build:unused_by_nt/2000/xp:12122:12119:build,U-MKE\build,S-1-5-21-1177238915-197 9792683-1801674531-2122:/user/build:/drv/c/adm/bin/sys/s/cmd_login_shell > 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 /drv/c/winnt/system32/cmd /bin/bash --login -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/