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: Persisting values of environment variables

Hash: SHA1

According to Nate Meyer on 11/23/2005 11:27 AM:
> I'm trying to change the value of $HOME. If I do something like "export
> HOME="c:/whatever" $HOME is changed for that session. But after Cygwin is
> closed and restarted $HOME is set back to the default /home/user. How can I
> persist the change to $HOME?

Windows way - edit your environment.  On Win9x, do it in c:\autoexec.bat.
 On an NT family (including XP), open up control panel, system, advanced,
environment variables (wasn't that so intuitive? I wish Microsoft would
have made it more accessible).  Now every program, cygwin or otherwise,
will see the change.

Cygwin way - edit your startup scripts.  For example, if you use bash,
create or modify ~/.bash_profile.  Note that the change is only seen by
cygwin programs, and only after that part of your startup scripts has been
sourced.  One other thing to look at is cygwin.bat, so that you set HOME
before firing off your shell but don't have to edit the environment for
all Windows programs.

- --
Life is short - so eat dessert first!

Eric Blake   
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Thunderbird -


Unsubscribe info:
Problem reports:

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