This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mintty question ("file name too long")


2009/12/20 Rogelio:
> I installed mintty (put the js file in the /bin folder, created a
> short cut, started the shell from that short cut)

You don't need to put the js file in the /bin folder. Its only purpose
is to create a mintty shortcut for you.

However, the easiest way to install mintty is through Cygwin's
setup.exe, where it appears in the "Shells" category. This will also
automatically create a suitable mintty shortcut under "Cygwin" in the
start menu.

> but I'm not able to
> use ssh, and when I type "ls" into my cygdrive directory, I get the
> following error. Â(Everything works fine from Cygwin's interface, of
> course)
>
> ****************************************************************
> Error: Current working directory is a virtual Cygwin directory.
> Can't start native Windows application from here.
>
> bash: /cygdrive/c/WINDOWS/system32/ls: File name too long
> bash-3.2$ ls -al
> Error: Current working directory is a virtual Cygwin directory.
> Can't start native Windows application from here.
>
> bash: /cygdrive/c/WINDOWS/system32/ls: File name too long
> bash-3.2$

I don't know what version of 'ls' you're picking up there, but in any
case it looks as if bash is being invoked as a non-login shell. That
means that /etc/profile isn't being executed, hence you don't get the
standard Cygwin prompt and the Cygwin /bin directory isn't added to
the path.

To ensure that bash is invoked as a login shell, mintty needs to be
invoked with a single dash ('-') as parameter, i.e. the shortcut
target needs to be something like: "C:\cygwin\bin\mintty.exe -".

Andy

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]