ncftp - works, but doesn't display any prompts

Richard Stanton stanton@haas.berkeley.edu
Thu Jan 25 08:35:00 GMT 2001


Ahah! I'd never have thought of that. If that's the second to last entry, it
says "/c". Thanks. That must be it (but bash still seems to behave
differently from ncftp - it seems to use the environment variable in
preference to this setting).

I have this set in /etc/passwd so that when I log in using, say, ssh, I am
put into my root directory. However, I'd prefer configuration files to be
stored in c:\home, to get them out of the way. Is there no way to have the
HOME environment variable override the entry in /etc/passwd for local
logins? I guess there must be, since bash does it.

Richard Stanton

> -----Original Message-----
> From: Larry Hall (RFK Partners, Inc) [ mailto:lhall@rfk.com ]
> Sent: Thursday, January 25, 2001 8:19 AM
> To: Richard Stanton; Charles S. Wilson
> Cc: Cygwin
> Subject: RE: ncftp - works, but doesn't display any prompts
>
>
> What's your Home directory in /etc/passwd?  Cygwin uses that so if its a
> Cywgin thing, that could be the problem.
>
> Larry
>
>
> At 11:08 AM 1/25/2001, Richard Stanton wrote:
> >Hmmm. HOME is set (in the NT environment) to "c:\home". I've also tried
> >"c:/home" and "/c/home". When I fire up bash and run "set", I see (among
> >other things):
> >
> >HISTFILE=/home/.bash_history
> >HOME=/home
> >HOMEDRIVE=C:
> >HOMEPATH='\'
> >
> >The bash history file is stored in c:\home\.bash_history, so
> bash uses the
> >directory I want (by the way, c:\home is mounted as /home), but ncftp
> >doesn't use the files in c:\home\.ncftp.
> >
> >Oh. One more thing... If I type "open" at the ncftp prompt, I see a nice
> >list of sites to choose from. When I scroll up and down the
> list, the format
> >of the highlighted item is different from that of the
> non-highlighted items
> >(the spacing is reduced), and this leave the entry messed up on
> the screen
> >after the highlighting moves onto the next item.
> >
> >Richard Stanton
> >
> >
> > > -----Original Message-----
> > > From: Charles S. Wilson [ mailto:cwilson@ece.gatech.edu ]
> > > Sent: Wednesday, January 24, 2001 5:42 PM
> > > To: Richard Stanton
> > > Cc: Cygwin
> > > Subject: Re: ncftp - works, but doesn't display any prompts
> > >
> > >
> > > If your $HOME variable (%HOME% outside of bash) is not set, then HOME
> > > will default to c:/.  This is a cygwin thing, not an ncftp thing.
> > >
> > > --Chuck
> > >
> > > Richard Stanton wrote:
> > > >
> > > > Thanks for checking into that, Charles. One more little thing -
> > > ncftp seems
> > > > to read and write its configuration files from/to the directory
> > > c:/.ncftp on
> > > > my disk, not c:/cygnus/.ncftp, even though I have
> "c:\cygnus" mounted as
> > > > "/". Should this be happening?
> > > >
> > > > Richard Stanton
> > > >
> > > > > -----Original Message-----
> > > > > From: Charles Wilson [ mailto:cwilson@ece.gatech.edu ]
> > > > > Sent: Wednesday, January 24, 2001 4:53 PM
> > > > > To: Richard Stanton
> > > > > Cc: Cygwin
> > > > > Subject: Re: ncftp - works, but doesn't display any prompts
> > > > >
> > > > >
> > > > > This is a bug in ncftp or cygwin.  If ncftp determines
> that it is not
> > > > > running from a TTY, it doesn't print any prompts.  Here's the
> > > code that
> > > > > it uses to determine that (ncftp/main.c):
> > > > >
> > > > >         gIsTTY = ((isatty(2) != 0) && (getppid() > 1)) ? 1 : 0;
> > > > >         gIsTTYr = ((isatty(0) != 0) && (getppid() > 1)) ? 1 : 0;
> > > > >
> > > > > Here's the result of those operations in a bash window:
> > > > > isatty(2) = 1
> > > > > isatty(0) = 1
> > > > > getppid() = 1764
> > > > > gIsTTY = 1
> > > > > gIsTTYr = 1
> > > > >
> > > > > And from a cmd prompt:
> > > > > isatty(2) = 1
> > > > > isatty(0) = 1
> > > > > getppid() = 1
> > > > > gIsTTY = 0
> > > > > gIsTTYr = 0
> > > > >
> > > > > I'm not sure what the right fix is.  Options:
> > > > >   1) Is this really a problem with the getppid implementation
> > > of cygwin
> > > > > (?)
> > > > >   2) patch ncftp to ignore the value of getppid() -- just use
> > > isatty(x)
> > > > >      --> #ifdef __CYGWIN__, or for all platforms?  Why
> does ncftp test
> > > > >      getppid() anyway?
> > > > >
> > > > > --Chuck
> > > > >
> > > > > Richard Stanton wrote:
> > > > > >
> > > > > > I just installed the latest version of ncftp using the cygwin
> > > > > setup program.
> > > > > > I love the program, and it seems to work fine, but I don't get
> > > > > any prompts
> > > > > > to make it clear I'm supposed to type. Here's a sample
> > > session, my input
> > > > > > preceded by "*":
> > > > > >
> > > > > > [c:\]ncftp
> > > > > > NcFTP 3.0.2 (October 19, 2000) by Mike Gleason
> (ncftp@ncftp.com).
> > > > > > *dir
> > > > > > dir: must be connected to do that.
> > > > > > *open ttt
> > > > > > Resolving ttt...
> > > > > >
> > > > > > Unknown host "ttt".
> > > > > >
> > > > > > How do I get it to display ftp-type command prompts?
> > > > > >
> > > > > > Richard Stanton
> > > > > >
> > > > > > --
> > > > > > Want to unsubscribe from this list?
> > > > > > Check out: http://cygwin.com/ml/#unsubscribe-simple
> > > > >
> > >
> >
> >
> >--
> >Want to unsubscribe from this list?
> >Check out: http://cygwin.com/ml/#unsubscribe-simple
>
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list