Cygwin <--> CMD App Problem (Terminal Type?)


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Cygwin <--> CMD App Problem (Terminal Type?)
# 1  
Old 05-28-2009
Cygwin <--> CMD App Problem (Terminal Type?)

I'm not sure if this is the right place to post this, but here it is. We have a nightly process that runs on an HP-UX box to stop our application and backend database servers, unmount their SAN hosted file systems, and then snapshot the SAN LUNs for backup and refresh of data on "report" and "test" systems. For the past five years it's all been done on the HP-UX side. But the new EVA4000 SAN we just moved to was purchased with a Windows 2003 server as the SAN manager.

We still need the snapshot creation/deletion managed from the HP-UX side. So to try and get this to happen, I installed Cygwin on the box. OpenSSH, Bash, and Vim were selected components. I got OpenSSH working great with the auth keys. I also am able to run many Windows CLI commands from the default Bash shell, or if need be set CMD.exe up as a shell for the SSH session. The problem is when I attempt to run the HP Commandview EVA "SSSU.EXE" command. The prompt goes away and there is no output from the app. I have to Ctrl-C to get out and sometimes an image of SSSU.EXE is left running on the system.

If I run SSSU from Bash on the Windows box itself, it also does the same thing. However, if I run it from CMD.EXE on the Windows box, it works. So I tried replacing the shell for the SSH login with CMD.EXE and SSSU still fails. As a test I tried running MS 'EDIT' in CMD directly on the box. That works as expected. But in Bash, or over OpenSSH, it behaves the same way the SSSU does.

What I suspect is happening is that both EDIT and SSSU expect something that only the CMD shell provides when executed locally. Likely some form of console or tty that Cygwin doesn't provide. So my question is... what might these applications be expecting that Cygwin isn't providing?

I wasn't sure whether to post this here or to the Windows mailing list I belong to. It feels kind of halfway between the Windows and *nix worlds.
# 2  
Old 05-29-2009
Better Solution Found: Run SSSU Native to HP-UX

I found a simple solution. There is an SSSU application that is native for HP-UX 11.23 on Itanium servers. Instead of needing to mess with Cygwin, I can just run a native application on Unix. In the process though, I learned the following as sidenotes:

1. According to the Cygwin docs, console applications sometime just won't work in the Cygwin environment. In those cases, they recommend running those applications in plain old CMD and if you need *nix commands, you can use the Cygwin apps from within CMD. This gives you the maximum interoperability possible in that scenario. It would not have worked for me.

2. If you want more unix-like terminal access, use 'rxvt' in Cygwin. Even without the Cygwin X server, it can give you X window cut and paste and a host of other *nix-like functionality.

3. There is an SSH server for Windows called Freesshd that does allow for console apps to work. This may have worked for me, but now that I have a native Unix app, I don't have a reason to try it in this instance. It seems that the only real benefits to Freesshd over Cygwin SSH are the ability to run console mode programs as expected including ANSI color, and a GUI to manage the server that is more applicable to Windows users.

4. There are two devices /dev/conin and /dev/conout in Cygwin which provide some stdio-like functionality but in Windows style rather than *nix. At least as far as I can tell. That was a bit beyond me, so I'll leave it to others to correct me if I'm wrong.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Differences with gawk on cmd vs cygwin

I have this script (thanks Don!) that runs as expected in cygwin: gawk -F, 'NR == 1{print "Source,Well_Source,Volume,Destination_Well,Destination"; OFS = ","; next}/Ladder/{next}LAST2 && $2 != LAST2{print "PCR_Plate", ++CNT, (SUM > 10)?800/SUM:0, 1, "Deadpool"; SUM = 0}{SUM += ( $4 > 430 && $4 <... (5 Replies)
Discussion started by: Xterra
5 Replies

2. BSD

How to play a song in terminal app in os x?

Just wondering -- is there a way to play a song in iTunes from the terminal app? (1 Reply)
Discussion started by: Straitsfan
1 Replies

3. AIX

UNIX cmd to check for non expiry type password

Hi, Here's the version of unix that we are working on. > uname -a AIX yyyyyyyy 1 6 00F613E24C00 @:on(cluster303)/iishomea/kmani00-> i have application id: aaabbb Now i need to check whether the password for the application id set to non expiry type or not. Moreover, with that unix... (3 Replies)
Discussion started by: kmanivan82
3 Replies

4. UNIX for Dummies Questions & Answers

Increase Font size for text to type in CYGWIN

Please mention "How to increase font size for text to type commands in CYGWIN " ? (2 Replies)
Discussion started by: adirajup
2 Replies

5. Solaris

Solaris Cmd to determine type of zone?

I lost my notes on the subject, but I remember running across a single Solaris command that tells you the following Global zone vs local zone Sparse local zone vs Whole Root local zone Can anyone advise? Thanks-In-Advance!! (2 Replies)
Discussion started by: ckmehta
2 Replies

6. Shell Programming and Scripting

Set default app for file type on Mac

Hi there, We have 2 apps on our customers machines that can both open files with the same file extension. Is there any way via shell commands to set which application should be the default? Essentially, I'm hoping to replicate Get Info > Open With > Change All using a shell script, but I just... (0 Replies)
Discussion started by: davewg
0 Replies

7. Shell Programming and Scripting

open terminal to run cmd using shell script

i want the shell script to open the terminal and in that terminal i want to run a command specified in the script... how can it be done... (2 Replies)
Discussion started by: chandrabhushan
2 Replies

8. UNIX Desktop Questions & Answers

Terminal title bar tweak discrepancy problem in Cygwin/X

Code for the tweak (not my fave 'running process' but the more popular 'working directory') : case "$TERM" in xterm*|rxvt*|rxvt-unicode*) PROMPT_COMMAND='echo -e "\033]0;$TERM: ${PWD}\007"' ;; *) ;; esac Where it works: rxvt (the one I run 'rootless' outside of ... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

9. Windows & DOS: Issues & Discussions

Display running 'app' in terminal titlebar?

Hi. I was, not too long ago, an OS X home user. One of the things I remember from using the Apple-installed Terminal is: whenever an executable that took more than a split second to do its thing was running, its name would appear in the title bar in a way similar to "Terminal: ssh" or "Terminal:... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

10. UNIX for Advanced & Expert Users

terminal type problem with cygwin on aix

hey, I use cygwin to connect to AIX 5.2 but when I open vi I get an error saying: ex: 0602-108 cygwin is not a recognized terminal type how can I fix that? I thought cygwin was tty vt100? (1 Reply)
Discussion started by: rein
1 Replies
Login or Register to Ask a Question