delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/05/16:17:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: Benoit Rochefort <Benoit DOT Rochefort AT gerad DOT ca>
MIME-Version: 1.0
Message-ID: <15456.19079.804940.878644@montreal.crt.umontreal.ca>
Date: Tue, 5 Feb 2002 16:11:35 -0500 (EST)
To: "Laurence F. Wood" <LaurenceWood AT sunyatasystems DOT com>
Cc: "Cygwin AT Cygwin. Com" <cygwin AT cygwin DOT com>
Subject: Re: $HOME Directory Relocation
In-Reply-To: <EIEOJCAKMFMIKEMJNANGIEGJCEAA.LaurenceWood@SunyataSystems.Com>
References: <EIEOJCAKMFMIKEMJNANGIEGJCEAA DOT LaurenceWood AT SunyataSystems DOT Com>
X-Mailer: VM 6.72 under 21.1 (patch 8) "Bryce Canyon" XEmacs Lucid
X-Face: C!5Mk_!qB]35}VpD|H>GN/@fk%~7:*/x8&~\]|r|)/zV?rJ){uX4Nh`a$L/z__Kx4Gt!mDU
3kZlj)F2]Ds$?l';SO9]v^|[i2nY`pZ+mu+HT%5ITkuP#e]@8F4 AT Hc.=]oN1+d\M AT Rl>-$C?h$yntf
-JVx)3L2}VzG.!bQEy]~I_3fup`HtZ^t/Iz.|Vh$~o`^g\
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g15LHaZ09340

Laurence F. Wood writes:
| Hello,
| 
| I needed to relocate the $HOME directory to another disk volume.  Under
| linux the login process sets this.  Who/what sets $HOME under cygwin?

Since no login occurs, place it in your batch file calling bash, or in
/etc/profile like I do. Here is my /etc/profile that correct many such
environment variable problems I found over the time:

###############################################################################
# File:   /etc/profile
# Author: Benoit Rochefort

# This file is only executed at login time!
# Be sure to include both the "--login" and the "-i" options to bash in
# your batch file calling bash in order to have this file sourced.

# Note that CYGWIN environment variable must be set before starting
# bash via the batch file and not here!!!

unset DOSDRIVE
unset DOSDIR
unset TMPDIR
unset TMP

PATH="/usr/local/bin:/usr/bin:/bin${PATH:+:$PATH}:."
MANPATH="/usr/local/man:/usr/man"
export PATH MANPATH

: ${LOGNAME:=${USER:=${USERNAME:=`/usr/bin/id -un`}}}
USER="$LOGNAME"
HOME="/home/$USER"
export LOGNAME USER HOME

MAKE_MODE=unix
export MAKE_MODE

PS1='[\u]\w>'
HISTFILE="$HOME/.bash_history"

cd $HOME 2>/dev/null || cd / 2>/dev/null

###############################################################################

Please consult the man page to know exactly when this file is invoked (for
most user, it is always on Windows).

| 
| 
| --
| Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
| Bug reporting:         http://cygwin.com/bugs.html
| Documentation:         http://cygwin.com/docs.html
| FAQ:                   http://cygwin.com/faq/
| 
| 

-- 
           *º¤., ¸¸,.¤º*¨¨¨*¤  Benoit Rochefort  *º¤., ¸¸,.¤º*¨¨¨*¤

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019