Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <000b01c34163$b063bcc0$6fc82486@medschool.dundee.ac.uk> Reply-To: From: To: Cc: Subject: Starting up : file seek order Date: Thu, 3 Jul 2003 14:04:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Four questions with my guessed answers. Please would it be possible for somebody who _knows_ the answers to respond? Then there's a 5th question, of the right answer to which I haven't a clue. Thanks very much indeed. Q1. When starting (a properly installed and mounted) Cygwin up using the command c:\bin\bash --login -i it seems that the file /etc/profile is sought and run then the file ~/.bash_profile likewise. Yes? (This seems to happen even when both files are empty, as evidenced by constructing them as one-line files of the type "echo This file is called...".) Q2. When starting Cygwin up using the command c:\bin\bash it seems that the file ~/.bashrc is sought and run. The file /etc/profile isn't. Yes? Q3. Even if all 3 files exist but are empty, Cygwin (however it is started up) "knows" what HOME is, and therefore I deduce it gets it from /etc/passwd. So, at some stage prior to the searches described in QQ1 and 2, /etc/passwd and /etc/group are sought. Yes? Q4. If /etc/passwd does not exist, then $HOME is set by default to /. Yes? My final question refers to a version of Cygwin run from a portable CD G: on a Cygwin-free machine, and therefore I recognise that it might not get (might not deserve) an answer. The system is mounted using the command g:\bin\mount g:/ / and thereafter it is started using (either) g:\bin\bash or g:\bin\bash --login -i. Apart from the differences described in Q1 and Q2 above either usage is thereafter indistinguishable (to me). The file g:\etc\passwd contains one line entry1:entry2:500:544:entry3:/home/entry4:/bin/bash and works fine on machines with W98(SE). But not on NT (although, annoyingly, I have a memory that once it did). Q5. Because when an attempt is made to run the CD version from NT machines it turns out that HOME is set to /, and not to /home/entry4, I deduce (possibly wrongly) that /etc/passwd as written above is either not being read or is inadequate to define HOME. Yes? I know that on NT and XP systems the command mkpasswd -l generates a file much more than one line long. I could try to use that, which would necessitate understanding it. Yuk. And run the risk of breaking the current happy working-ness on W98 systems. I know I could, and should, try it. But maybe something I've written will generate a quick and clear pointer to what's tripping the NT mounted portable system up? Thank you. Fergus -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/