public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Latest cygwin.bat - need one
@ 2011-12-12  5:48 Mike Brown
  2011-12-12  6:31 ` Mike Brown
  0 siblings, 1 reply; 17+ messages in thread
From: Mike Brown @ 2011-12-12  5:48 UTC (permalink / raw)
  To: cygwin mail list

Because I already had a cygwin.bat file, the upgrade from 1.5.x to 1.7.x did
not provide a new one, not even a cygwin.bat.sample (which would have been
nice), so that one could see if there are differences between releases.

As a result of there not being a sample, my current bat file will not
correctly start my Z-shell.  Most of the time double-clicking on the shortcut
results in the program (CMD) flashing on the screen and going away.  When it
does manage to stick, it seems to fail to start the zsh login process, i.e.,
the reading on my .z* startup files.  That results in any entered characters
being ignored, as there isn't a prompt there to accept input.

If I start cmd.exe manually, I can then start zsh and have something to work
with.  At that point, if I run cygwin.bat, (from the shell, not the shortcut)
it works.  Something in the 1.7 environment is required for rxvt to work
correctly, even though rxvt is the same version in both installations (1.5 and
1.7).  That or something changed to keep zsh from starting via the bat file
using rxvt.

If someone would be so kind as to post the contents of the default installed
cygwin.bat file, I'd appreciate it.  It is the only thing keeping me from
getting back to where I was working, before the upgrade.

Thanks.

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12  5:48 Latest cygwin.bat - need one Mike Brown
@ 2011-12-12  6:31 ` Mike Brown
  2011-12-12  7:13   ` Tim McDaniel
  2011-12-12 15:45   ` Ken Brown
  0 siblings, 2 replies; 17+ messages in thread
From: Mike Brown @ 2011-12-12  6:31 UTC (permalink / raw)
  To: cygwin

On Sun, Dec 11, 2011 at 11:48:01PM -0600, Mike Brown wrote:
> As a result of there not being a sample, my current bat file will not
> correctly start my Z-shell.  Most of the time double-clicking on the shortcut
> results in the program (CMD) flashing on the screen and going away.  When it
> does manage to stick, it seems to fail to start the zsh login process, i.e.,
> the reading on my .z* startup files.  That results in any entered characters
> being ignored, as there isn't a prompt there to accept input.

From what I can discover, the default cygwin.bat file does not use rxvt.  It
has been a while since I first installed cygwin.

I was starting my shell with the following line:

    rxvt -e zsh --login -i

That got me the window, but not the shell.  Doing some more digging I found
the following posting (via google):

    > Does changing 'bash' to '/bin/bash' make a difference?

    Answering my own question: yes.

    There was a change in execvp()'s behaviour to no longer look up an
    executable in the current working directory, wasn't there? I can't
    find it in the ChangeLog though.

You've got to be kidding.  Why was the looking into CWD removed?  Probably
beating a dead horse.

Suggestions for document improvement:

FAQ addition to show how to modify the cygwin.bat file, or a copied file for
modification, in order to be able to run rxvt to start a better terminal.
This would solve the issue of users upgrading and their BAT file being broken.
Be sure to explain that "/bin/" is now required.

Same thing with the main documention.  There are pieces about starting the
shell, but absolutely nothing about using a better terminal (rxvt) and how
to start/configure it.

Hell, why not make the use of rxvt standard in the default BAT file.  The
rxvt terminal is many times superior to the Windblows cmd terminal.

The only thing left now is getting ssh configured correctly so that I can
remotely log into the Windblows box using ssh.  The two config scripts failed
to provide a working config.  The remote login fails at the password checking.

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12  6:31 ` Mike Brown
@ 2011-12-12  7:13   ` Tim McDaniel
  2011-12-12  8:01     ` Mike Brown
  2011-12-12 15:45   ` Ken Brown
  1 sibling, 1 reply; 17+ messages in thread
From: Tim McDaniel @ 2011-12-12  7:13 UTC (permalink / raw)
  Cc: cygwin

On Mon, 12 Dec 2011, Mike Brown wrote:
> Doing some more digging I found
> the following posting (via google):
>
>    > Does changing 'bash' to '/bin/bash' make a difference?
>
>    Answering my own question: yes.
>
>    There was a change in execvp()'s behaviour to no longer look up
>    an executable in the current working directory, wasn't there? I
>    can't find it in the ChangeLog though.
>
> You've got to be kidding.  Why was the looking into CWD removed?

PATH specifies the list of directories to search for executables.
So if execvp() ever used "." unconditionally regardless of PATH,
then it violated one of the most long-standing UNIXy rules.

It can also be a massive security hole.  On a multi-user system,
I can put a script named "ls" in /tmp, or other likely directory for
others to cd to, to
- copy /bin/bash to some location
- set the setuid bit and setgid on this copy
- run /bin/ls
   (Bonus points: somehow filter out this nasty ls script if they are
   looking at /tmp.  This is hard.)
Anyone foolish enough to put "." near the start of their PATH and who
did
     cd /tmp
     ls
would thereby get their account hacked, and changing their password
would do no good.  I removed "." from my PATH in the 1980s for just
this reason.  At least if "." is after standard system directories
like /bin /usr/bin, it mitigates the problem to a large extent: it
catches only typos and attempts to run programs that you don't have
installed.  I wonder if there are any common typos to try for.

If execvp() ever looked in "."  unconditionally, there would be no way
to ever completely close this security hole.

-- 
Tim McDaniel, tmcd@panix.com

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12  7:13   ` Tim McDaniel
@ 2011-12-12  8:01     ` Mike Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Brown @ 2011-12-12  8:01 UTC (permalink / raw)
  To: cygwin

On Mon, Dec 12, 2011 at 01:13:02AM -0600, Tim McDaniel wrote:
> On Mon, 12 Dec 2011, Mike Brown wrote:
>> Doing some more digging I found
>> the following posting (via google):
>>
>>    > Does changing 'bash' to '/bin/bash' make a difference?
>>
>>    Answering my own question: yes.
>>
>>    There was a change in execvp()'s behaviour to no longer look up
>>    an executable in the current working directory, wasn't there? I
>>    can't find it in the ChangeLog though.
>>
>> You've got to be kidding.  Why was the looking into CWD removed?
>
> PATH specifies the list of directories to search for executables.
> So if execvp() ever used "." unconditionally regardless of PATH,
> then it violated one of the most long-standing UNIXy rules.

Yes, I know all about the "." security hole and have cleaned many things
that used it.

Even if execvp() was changed to no longer use ".", it should still use the
default path for system executables.  Cygwin does have a default, does it not?
It would seem not, otherwise the absolute path to the shell wouldn't be
required.

Funny thing is that the rxvt program was found.  Ya, I know, Windblows found
it, because it does look in the CWD.  But, once rxvt was started, wouldn't
the default cygwin PATH be brought in so that executables can be found?
Therefore execvp() shouldn't have an issue finding system executables.

So, based upon what actually happens and the user doc, it seems that at
startup, cygwin is deaf, dumb and blind regarding the executables in /bin.
You'd think that cygwin would at least know that when it starts.

Any particular reason why cygwin can't build itself a default PATH for
system executables?

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12  6:31 ` Mike Brown
  2011-12-12  7:13   ` Tim McDaniel
@ 2011-12-12 15:45   ` Ken Brown
  2011-12-12 17:45     ` Mike Brown
  2011-12-13 11:34     ` Corinna Vinschen
  1 sibling, 2 replies; 17+ messages in thread
From: Ken Brown @ 2011-12-12 15:45 UTC (permalink / raw)
  To: cygwin

On 12/12/2011 1:31 AM, Mike Brown wrote:
> On Sun, Dec 11, 2011 at 11:48:01PM -0600, Mike Brown wrote:
> Suggestions for document improvement:
>
> FAQ addition to show how to modify the cygwin.bat file, or a copied file for
> modification, in order to be able to run rxvt to start a better terminal.
> This would solve the issue of users upgrading and their BAT file being broken.
> Be sure to explain that "/bin/" is now required.
>
> Same thing with the main documention.  There are pieces about starting the
> shell, but absolutely nothing about using a better terminal (rxvt) and how
> to start/configure it.
>
> Hell, why not make the use of rxvt standard in the default BAT file.  The
> rxvt terminal is many times superior to the Windblows cmd terminal.

There is no longer a default BAT file, and the Windows console is no 
longer the default terminal.  The default terminal is now mintty.  The 
current setup.exe creates desktop and start menu shortcuts to start it. 
This was announced in

   http://cygwin.com/ml/cygwin-announce/2011-11/msg00043.html

Ken

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 15:45   ` Ken Brown
@ 2011-12-12 17:45     ` Mike Brown
  2011-12-12 20:19       ` Jeremy Bopp
  2011-12-12 20:28       ` Ken Brown
  2011-12-13 11:34     ` Corinna Vinschen
  1 sibling, 2 replies; 17+ messages in thread
From: Mike Brown @ 2011-12-12 17:45 UTC (permalink / raw)
  To: cygwin

On Mon, Dec 12, 2011 at 10:45:12AM -0500, Ken Brown wrote:
> There is no longer a default BAT file, and the Windows console is no longer 
> the default terminal.  The default terminal is now mintty.  The current 
> setup.exe creates desktop and start menu shortcuts to start it. This was 
> announced in
>
>   http://cygwin.com/ml/cygwin-announce/2011-11/msg00043.html

From the user guide:

    Icons

    You may choose to install shortcuts on the Desktop and/or Start Menu to
    start a bash shell. If you prefer to use a different shell or terminal
    emulator such as mintty or xterm, you can use these shortcuts as a guide
    to creating your own.


    Console Programs

    Alternatively, the optional mintty package provides a terminal emulator
    similar to such X11 programs as xterm (it is not necessary to set
    CYGWIN=tty with mintty nor is it necessary to be running /Cygwin/X).
    Using mintty.exe provides the most Unix-like environment, but expect
    some compatibility problems with Windows programs.


    Overview

    You may wish to specify settings of several important environment variables
    that affect Cygwin's operation. Some of these settings need to be in effect
    prior to launching the initial Cygwin session (before starting your bash
    shell, for instance). They should therefore be set in the Windows
    environment; all Windows environment variables are imported when Cygwin
    starts. Such settings can be placed in a .bat file. An initial file is
    named Cygwin.bat and is created in the Cygwin root directory that you
    specified during setup. Note that the "Cygwin" option of the Start Menu
    points to Cygwin.bat. Edit Cygwin.bat to your liking or create your own
    .bat files to start Cygwin processes.


From the FAQ:

    4.38.	
    Is there a better alternative to the standard console window?
	
    Yes! Use mintty instead. mintty is an optional packages in Cygwin Setup.
    mintty is a Cygwin application providing a native GUI without the need
    of X11


In other words, no where in the documentation is it stated that mintty is now
the default startup.  It all leans toward cygwin.bat as being the way things
are started.

So, just what is a user supposed to think when reading the documentation.
When I did the install, I told it not to install the desktop shortcut, as I
already have one.  There was no indication during the install to inform the
user that mintty is now the default startup, instead of cygwin.bat.

At this point in time, I have no clue as to how to set up cygwin to use it,
just to see what it is like.  The rxvt program has been working for me.

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 17:45     ` Mike Brown
@ 2011-12-12 20:19       ` Jeremy Bopp
  2011-12-12 20:28       ` Ken Brown
  1 sibling, 0 replies; 17+ messages in thread
From: Jeremy Bopp @ 2011-12-12 20:19 UTC (permalink / raw)
  To: cygwin

On 12/12/2011 11:44 AM, Mike Brown wrote:

snipped doc references...

> In other words, no where in the documentation is it stated that mintty is now
> the default startup.  It all leans toward cygwin.bat as being the way things
> are started.
> 
> So, just what is a user supposed to think when reading the documentation.
> When I did the install, I told it not to install the desktop shortcut, as I
> already have one.  There was no indication during the install to inform the
> user that mintty is now the default startup, instead of cygwin.bat.

Those are good points about the documentation.  The change to mintty
happened fairly recently though, so I'm sure the documentation will be
updated sometime soon to reflect the current reality.  You may be able
to contribute patches for the documentation if that interests you enough.

> At this point in time, I have no clue as to how to set up cygwin to use it,
> just to see what it is like.

I would try installing fresh to a new directory and taking all the
defaults, from package selection to shortcut creation.  Leave your
current installation alone since it probably has some settings you don't
want to lose or that may interfere with a fresh Cygwin experience.  Once
you figure out what your original installation needs, you can copy those
changes over either manually or by re-running setup.exe as necessary.

> The rxvt program has been working for me.

I used to use rxvt a long time ago, but it's dead upstream from what I
last heard.  Don't expect much help if it doesn't work in Cygwin.  Urxvt
is probably your only option if you *must* use something like rxvt for
some reason.  It requires X to be running though...

Mintty is a big improvement over the Windows terminal and rxvt, so give
it a try.  If you don't let setup.exe create the shortcut for you, it's
as easy as creating a shortcut that runs mintty as follows from within
the bin directory of your Cygwin installation:

mintty -

That will start a login shell for you using the shell you have
configured in /etc/passwd.  From there you can configure mintty by right
clicking to open a context menu and opening the the configuration
dialog.  You can find more documentation by reading mintty's manpage.

Good luck.

-Jeremy

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 17:45     ` Mike Brown
  2011-12-12 20:19       ` Jeremy Bopp
@ 2011-12-12 20:28       ` Ken Brown
  2011-12-12 21:24         ` Mike Brown
  1 sibling, 1 reply; 17+ messages in thread
From: Ken Brown @ 2011-12-12 20:28 UTC (permalink / raw)
  To: cygwin

On 12/12/2011 12:44 PM, Mike Brown wrote:
> On Mon, Dec 12, 2011 at 10:45:12AM -0500, Ken Brown wrote:
>> There is no longer a default BAT file, and the Windows console is no longer
>> the default terminal.  The default terminal is now mintty.  The current
>> setup.exe creates desktop and start menu shortcuts to start it. This was
>> announced in
>>
>>    http://cygwin.com/ml/cygwin-announce/2011-11/msg00043.html
>
[...]
> So, just what is a user supposed to think when reading the documentation.

You're right, the documentation is out of date.  I'll try to submit some 
patches within the next couple weeks if no one beats me to it.  (Much of 
the documentation has already been updated in CVS.)

By the way, I was wrong when I said there is no longer a default BAT 
file.  setup.exe still creates /Cygwin.bat if it doesn't already exist. 
  But setup.exe no longer creates a shortcut to start it.

> When I did the install, I told it not to install the desktop shortcut, as I
> already have one.  There was no indication during the install to inform the
> user that mintty is now the default startup, instead of cygwin.bat.
>
> At this point in time, I have no clue as to how to set up cygwin to use it,
> just to see what it is like.  The rxvt program has been working for me.

There's nothing to set up.  You just click on the start menu shortcut. 
You can then right click in the mintty window and select "Options" if 
you want to change some of the defaults.

Ken

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 20:28       ` Ken Brown
@ 2011-12-12 21:24         ` Mike Brown
  2011-12-12 21:30           ` Jeremy Bopp
  0 siblings, 1 reply; 17+ messages in thread
From: Mike Brown @ 2011-12-12 21:24 UTC (permalink / raw)
  To: cygwin

On Mon, Dec 12, 2011 at 03:28:39PM -0500, Ken Brown wrote:
> There's nothing to set up.  You just click on the start menu shortcut. You 
> can then right click in the mintty window and select "Options" if you want 
> to change some of the defaults.

In my case that is a no go.  That is because, as mentioned, I told the
installer not to create the desktop shortcut or the start menu option, as I
already had them.  So, the start menu currently points to the BAT file.

If there is an example of what the desktop shortcut has for the properties,
I can create one to see what mintty looks like.  I've never used mintty
under Solaris or Linux.

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 21:24         ` Mike Brown
@ 2011-12-12 21:30           ` Jeremy Bopp
  2011-12-13  0:11             ` Gary Johnson
  0 siblings, 1 reply; 17+ messages in thread
From: Jeremy Bopp @ 2011-12-12 21:30 UTC (permalink / raw)
  To: cygwin

On 12/12/2011 03:23 PM, Mike Brown wrote:
> In my case that is a no go.  That is because, as mentioned, I told the
> installer not to create the desktop shortcut or the start menu option, as I
> already had them.  So, the start menu currently points to the BAT file.

Hmm, it seems that my messages aren't getting through since I mentioned
how to create such a shortcut just a little while ago, but I'll try one
more time...

Create a shortcut that starts in the bin directory of your Cygwin
installation.  Have it run:

mintty -

That's it as far as I remember.  Of course, the easy way is to just run
setup.exe again and let it create the shortcut for you.  Then you know
you have the right settings.

> If there is an example of what the desktop shortcut has for the properties,
> I can create one to see what mintty looks like.  I've never used mintty
> under Solaris or Linux.

Mintty doesn't exist under Solaris or Linux, only Cygwin.

-Jeremy

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 21:30           ` Jeremy Bopp
@ 2011-12-13  0:11             ` Gary Johnson
  2011-12-13  1:38               ` Mike Brown
  0 siblings, 1 reply; 17+ messages in thread
From: Gary Johnson @ 2011-12-13  0:11 UTC (permalink / raw)
  To: cygwin

On 2011-12-12, Jeremy Bopp wrote:
> On 12/12/2011 03:23 PM, Mike Brown wrote:
> > In my case that is a no go.  That is because, as mentioned, I told the
> > installer not to create the desktop shortcut or the start menu option, as I
> > already had them.  So, the start menu currently points to the BAT file.
> 
> Hmm, it seems that my messages aren't getting through since I mentioned
> how to create such a shortcut just a little while ago, but I'll try one
> more time...
> 
> Create a shortcut that starts in the bin directory of your Cygwin
> installation.  Have it run:
> 
> mintty -
> 
> That's it as far as I remember.  Of course, the easy way is to just run
> setup.exe again and let it create the shortcut for you.  Then you know
> you have the right settings.

I just ran the new setup.exe a few weeks ago and haven't changed the
new Cygwin Terminal shortcut's properties.  These are the most
important ones.

    General
        [Name:] Cygwin Terminal
    Shortcut
        Target: C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
        Start in: [empty]
        Shortcut key: None
        Run: Normal window
        [Icon:] C:\cygwin\Cygwin-Termina.ico

HTH,
Gary


--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-13  0:11             ` Gary Johnson
@ 2011-12-13  1:38               ` Mike Brown
  2011-12-13  2:07                 ` mintty Mike Brown
                                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Mike Brown @ 2011-12-13  1:38 UTC (permalink / raw)
  To: cygwin mail list

On Mon, Dec 12, 2011 at 04:11:48PM -0800, Gary Johnson wrote:
>     General
>         [Name:] Cygwin Terminal
>     Shortcut
>         Target: C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
>         Start in: [empty]
>         Shortcut key: None
>         Run: Normal window
>         [Icon:] C:\cygwin\Cygwin-Termina.ico

Thanks, I created a shortcut with the above info and it is close.

It starts and it finds my shell and my config files.  But $SHELL is empty
and the terminal has no clue as to where any of the Cygwin programs are.
The PATH that is created before any of my files are read contains info on
Windblows program locations, but nowhere is /usr/bin or /bin, or any of the
long path names to the Cygwin binaries.

When started from the cygwin.bat file, "/usr/local/bin:/usr/bin:/bin:" prefice
the Windblows paths.  So, a PATH that includes the needed info to the cygwin
binaries is built when BAT is run, but not when mintty is started.

Is there a reason why Cygwin is not building a PATH with the needed info?

I've modified my environment resource file to look for $TERM == xterm and
added the needed Cygwin paths.

BTW, what is with white text on a black background?  UGGHH!  :-)

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: mintty
  2011-12-13  1:38               ` Mike Brown
@ 2011-12-13  2:07                 ` Mike Brown
  2011-12-13  3:07                 ` Latest cygwin.bat - need one Ken Brown
  2011-12-13  3:12                 ` Jeremy Bopp
  2 siblings, 0 replies; 17+ messages in thread
From: Mike Brown @ 2011-12-13  2:07 UTC (permalink / raw)
  To: cygwin

On Mon, Dec 12, 2011 at 07:37:46PM -0600, Mike Brown wrote:
> Is there a reason why Cygwin is not building a PATH with the needed info?

Not only that, it doesn't start out in the user's home directory.

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-13  1:38               ` Mike Brown
  2011-12-13  2:07                 ` mintty Mike Brown
@ 2011-12-13  3:07                 ` Ken Brown
  2011-12-13  4:24                   ` Mike Brown
  2011-12-13  3:12                 ` Jeremy Bopp
  2 siblings, 1 reply; 17+ messages in thread
From: Ken Brown @ 2011-12-13  3:07 UTC (permalink / raw)
  To: cygwin

[Sorry, I again accidentally replied to the OP instead of to the list.]

On 12/12/2011 8:37 PM, Mike Brown wrote:
> On Mon, Dec 12, 2011 at 04:11:48PM -0800, Gary Johnson wrote:
>>      General
>>          [Name:] Cygwin Terminal
>>      Shortcut
>>          Target: C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
>>          Start in: [empty]
>>          Shortcut key: None
>>          Run: Normal window
>>          [Icon:] C:\cygwin\Cygwin-Termina.ico
>
> Thanks, I created a shortcut with the above info and it is close.
>
> It starts and it finds my shell and my config files.  But $SHELL is empty
> and the terminal has no clue as to where any of the Cygwin programs are.
> The PATH that is created before any of my files are read contains info on
> Windblows program locations, but nowhere is /usr/bin or /bin, or any of the
> long path names to the Cygwin binaries.
>
> When started from the cygwin.bat file, "/usr/local/bin:/usr/bin:/bin:" prefice
> the Windblows paths.  So, a PATH that includes the needed info to the cygwin
> binaries is built when BAT is run, but not when mintty is started.
>
> Is there a reason why Cygwin is not building a PATH with the needed info?

Are you sure you didn't forget the `-' at the end of the target?  That's 
what tells mintty to start your shell as a login shell, in which case 
the commands in /etc/profile should get executed.  One of the commands 
in the default /etc/profile adds /usr/local/bin and /usr/bin to PATH. 
Have you modified /etc/profile?

Ken

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-13  1:38               ` Mike Brown
  2011-12-13  2:07                 ` mintty Mike Brown
  2011-12-13  3:07                 ` Latest cygwin.bat - need one Ken Brown
@ 2011-12-13  3:12                 ` Jeremy Bopp
  2 siblings, 0 replies; 17+ messages in thread
From: Jeremy Bopp @ 2011-12-13  3:12 UTC (permalink / raw)
  To: cygwin

On 12/12/2011 07:37 PM, Mike Brown wrote:
> On Mon, Dec 12, 2011 at 04:11:48PM -0800, Gary Johnson wrote:
>>     General
>>         [Name:] Cygwin Terminal
>>     Shortcut
>>         Target: C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -
>>         Start in: [empty]
>>         Shortcut key: None
>>         Run: Normal window
>>         [Icon:] C:\cygwin\Cygwin-Termina.ico
> 
> Thanks, I created a shortcut with the above info and it is close.
> 
> It starts and it finds my shell and my config files.  But $SHELL is empty
> and the terminal has no clue as to where any of the Cygwin programs are.
> The PATH that is created before any of my files are read contains info on
> Windblows program locations, but nowhere is /usr/bin or /bin, or any of the
> long path names to the Cygwin binaries.
> 
> When started from the cygwin.bat file, "/usr/local/bin:/usr/bin:/bin:" prefice
> the Windblows paths.  So, a PATH that includes the needed info to the cygwin
> binaries is built when BAT is run, but not when mintty is started.
> 
> Is there a reason why Cygwin is not building a PATH with the needed info?

As I recall, all of the PATH settings are handled in /etc/profile and
files in /etc/profile.d.  It sounds like you have a problem somewhere in
there.  Maybe you made local changes that prevented the package that
provides /etc/profile from updating it when you upgraded Cygwin.

Try installing a fresh instance of Cygwin to a different directory and
see if things behave better there.  You can leave your current
installation where it is without much risk of interference, assuming
your shell startup scripts don't have any hard coded paths to the
original location.

> I've modified my environment resource file to look for $TERM == xterm and
> added the needed Cygwin paths.

That shouldn't be necessary once you get the real problem sorted out.

> BTW, what is with white text on a black background?  UGGHH!  :-)

To each his own.  Hopefully, you found all the configuration options so
that you can change it as you please. :-)

-Jeremy

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-13  3:07                 ` Latest cygwin.bat - need one Ken Brown
@ 2011-12-13  4:24                   ` Mike Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Brown @ 2011-12-13  4:24 UTC (permalink / raw)
  To: cygwin

On Mon, Dec 12, 2011 at 10:07:23PM -0500, Ken Brown wrote:
> [Sorry, I again accidentally replied to the OP instead of to the list.]

Easy to do the way this mail list is set up.

> Are you sure you didn't forget the `-' at the end of the target?  That's 
> what tells mintty to start your shell as a login shell, in which case the 
> commands in /etc/profile should get executed.  One of the commands in the 
> default /etc/profile adds /usr/local/bin and /usr/bin to PATH. Have you 
> modified /etc/profile?

Oops, the cut-n-paste missed the '-' at the end.

All is well now.  Got the other stuff set up as well, like getting rid of
the white on black :-)

Thanks.

All that is left is ssh :-(

MB
-- 
e-mail: vidiot@vidiot.com | vidiot@vidiot.net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Latest cygwin.bat - need one
  2011-12-12 15:45   ` Ken Brown
  2011-12-12 17:45     ` Mike Brown
@ 2011-12-13 11:34     ` Corinna Vinschen
  1 sibling, 0 replies; 17+ messages in thread
From: Corinna Vinschen @ 2011-12-13 11:34 UTC (permalink / raw)
  To: cygwin

On Dec 12 10:45, Ken Brown wrote:
> On 12/12/2011 1:31 AM, Mike Brown wrote:
> >On Sun, Dec 11, 2011 at 11:48:01PM -0600, Mike Brown wrote:
> >Suggestions for document improvement:
> >
> >FAQ addition to show how to modify the cygwin.bat file, or a copied file for
> >modification, in order to be able to run rxvt to start a better terminal.
> >This would solve the issue of users upgrading and their BAT file being broken.
> >Be sure to explain that "/bin/" is now required.
> >
> >Same thing with the main documention.  There are pieces about starting the
> >shell, but absolutely nothing about using a better terminal (rxvt) and how
> >to start/configure it.
> >
> >Hell, why not make the use of rxvt standard in the default BAT file.  The
> >rxvt terminal is many times superior to the Windblows cmd terminal.
> 
> There is no longer a default BAT file, and the Windows console is no

The Cygwin.bat file is still created for those who want to continue
using it.  The desktop and start menu shortcuts just don't refer to it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-12-13 11:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12  5:48 Latest cygwin.bat - need one Mike Brown
2011-12-12  6:31 ` Mike Brown
2011-12-12  7:13   ` Tim McDaniel
2011-12-12  8:01     ` Mike Brown
2011-12-12 15:45   ` Ken Brown
2011-12-12 17:45     ` Mike Brown
2011-12-12 20:19       ` Jeremy Bopp
2011-12-12 20:28       ` Ken Brown
2011-12-12 21:24         ` Mike Brown
2011-12-12 21:30           ` Jeremy Bopp
2011-12-13  0:11             ` Gary Johnson
2011-12-13  1:38               ` Mike Brown
2011-12-13  2:07                 ` mintty Mike Brown
2011-12-13  3:07                 ` Latest cygwin.bat - need one Ken Brown
2011-12-13  4:24                   ` Mike Brown
2011-12-13  3:12                 ` Jeremy Bopp
2011-12-13 11:34     ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).