This is the mail archive of the 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: cygwin.bat suggestions

Jon LaBadie <> wrote around 10 Jul 2002 about %s: 

> On Wed, Jul 10, 2002 at 12:06:09PM +0100, David Starks-Browning wrote:
>> On Tuesday 9 Jul 02, Dantin writes:
>> >       How do I use rxvt in conjuction with the cygwin do I need a
>> >       switch for 
>> > the batch file? If so what would that switch be? Or do I need to
>> > modify the batch file itself?
>> If you search the email archives you should find numerous examples of
>> how people invoke rxvt.  I use a shortcut as follows:
>>      C:\cygwin\bin\rxvt.exe -e bash --login
> I'm looking for sample cygwin.bat files.
> I tried a search of the archives, what a mistake, information
> overload. But after scanning several hundred messages, no samples.

Yeah, I know. More `General Meanness' at work ;-)
> Of course, that is shell programming, not windows batch file
> programming. I'm good at the former, not the latter :(
> Any suggestion for picking up the shell preference of the user
> invoking the cygwin.bat file?

Not specifically. I only use bash at present. I am just going to make my
Cygwin.bat available for people to look at for the general odd chance
they might see something that helps them. 

It will be at this url for the time being (I am not promising past a
time frame of the next several weeks, that is; I reserve the right to
reorganize my site):

Right now what's there is completely bare of expansive explanation; it's
just code. My .bat file for Cygwin does some very unusual things because
I am using Win98, not NT, and because I have (in the past) been a
multi-booter between Win98 and NT and wanted the same setup .bat file to
serve both. 

I will mention one thing concerning user preferences and home dirs:
you've been told to have Cygwin use the home dirs under %USERPROFILE%\
and that's fine, it's a natural idea; under NT-like Windozen the shell
automatically contains, by default, an env var that points to the user's
%USERPROFILE%. But I feel there's a compelling reason to resist this
first suggestion and instead do something else, and that reason is that
we are dealing with _Windows_. Anybody with a little experience with
Windows knows that the day may come when your entire OS installation has
been hosed (particularly, maybe, if you are a home user and your machine
serves multiple purposes) and you'll be doing a reformat of C: ... and
there go your laboriously-crafted shell init files and ALL the other
data in your ~/ dir(s). Happy day, not. 

I think it's rational and prudent to make a completely separate
directory for Cygwin users' home dirs. I personally don't want my Cygwin
files to live on the same partition (logical drive) with the Windows
system. I'd make a directory like D:\home and then use the Cygwin setup
.bat files and the predefined and admin-defined (in the case of Win9x)
Windows env variables to get to them. See my site above for examples of
what i mean. It's really pretty trivial .bat scripting and involves
setting maybe two new variables only for Win9x in your autoexec.bat. 

    Soren A

Unsubscribe info:
Bug reporting:

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