Re: [ncl-talk] NCL install into Cygwin

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 17 2012 - 09:49:03 MDT

Mark,

I'm not sure about .bash_profile myself, but you can google it. I found the following information:

>From the bash man page:

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.

--Mary

On Sep 17, 2012, at 2:28 AM, Mark Chan wrote:

> Dear Mary,
>
> In my home folder there are three files as ".bashrc" ".bash_profile" and ".profile". In the descrption of .profile that if ".bash_profile" exist, then ".profile" doesn't work.
>
> When do "source .bash_profile", it will also run ".bashrc". If only run ".bashrc", it is not complete. So I have to always manually run ".bash_profile". I still wonder why ".bash_profile" did not run automatically.
>
> -----------my ".bash_profile" as:-------------
> # To the extent possible under law, the author(s) have dedicated all
> # copyright and related and neighboring rights to this software to the
> # public domain worldwide. This software is distributed without any warranty.
> # You should have received a copy of the CC0 Public Domain Dedication along
> # with this software.
> # If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
> # base-files version 4.1-1
> # ~/.bash_profile: executed by bash(1) for login shells.
> # The latest version as installed by the Cygwin Setup program can
> # always be found at /etc/defaults/etc/skel/.bash_profile
> # Modifying /etc/skel/.bash_profile directly will prevent
> # setup from updating it.
> # The copy in your home directory (~/.bash_profile) is yours, please
> # feel free to customise it to create a shell
> # environment to your liking. If you feel a change
> # would be benifitial to all, please feel free to send
> # a patch to the cygwin mailing list.
> # User dependent .bash_profile file
> # source the users bashrc if it exists
> if [ -f "${HOME}/.bashrc" ] ; then
> source "${HOME}/.bashrc"
> fi
> source /home/ychen/.bashrc
> # Set PATH so it includes user's private bin if it exists
> # if [ -d "${HOME}/bin" ] ; then
> # PATH="${HOME}/bin:${PATH}"
> # fi
> # Set MANPATH so it includes users' private man if it exists
> # if [ -d "${HOME}/man" ]; then
> # MANPATH="${HOME}/man:${MANPATH}"
> # fi
> # Set INFOPATH so it includes users' private info if it exists
> # if [ -d "${HOME}/info" ]; then
> # INFOPATH="${HOME}/info:${INFOPATH}"
> # fi
>
> From: Mary Haley <haley@ucar.edu>
> To: Mark Chan <cym263@yahoo.com>
> Cc: "ncl-install@ucar.edu" <ncl-install@ucar.edu>
> Sent: Saturday, September 15, 2012 12:10 AM
> Subject: Re: [ncl-talk] NCL install into Cygwin
>
> Mark,
>
> It may be a different file, like ".bashrc" or ".profile". You can see if you have these files with:
>
> ls -a ~/.
>
> I've seen cases where users had one or more of these files, and usually it's the .profile file that is executed automatically.
>
> --Mary
>
> On Sep 14, 2012, at 1:02 AM, Mark Chan wrote:
>
> >
> > Dear NCL developer,
> >
> > I would like to use NCL in cygwin. I want to ask why the ".bash_profile" was not executed automatically when I start up cygwin ( I have to do as "source .bash_profile" manually).
> > I know this is a linux question but I would appreciate it if you could give any help.
> >
> > With my best regards,
> > Mark
> >
> > ----- Forwarded Message -----
> > From: Mary Haley <haley@ucar.edu>
> > To: Mark Chan <cym263@yahoo.com>
> > Cc: NCL Helpline <ncl-talk@ucar.edu>
> > Sent: Wednesday, September 12, 2012 4:08 AM
> > Subject: Re: [ncl-talk] NCL install into Cygwin
> >
> > Dear Mark,
> >
> > In the future, please post NCL installation questions to ncl-install_at_ucar.edu (http://mailman.ucar.edu/mailman/listinfo/ncl-install).
> >
> > It looks like your NCARG_ROOT environment variable is not set, or is not set correctly. For information on setting NCARG_ROOT, read:
> >
> > http://www.ncl.ucar.edu/Download/install.shtml#SetNCARG_ROOT
> >
> > --Mary
> >
> > On Sep 10, 2012, at 2:27 AM, Mark Chan wrote:
> >
> > >
> > > Dear NCL developer,
> > >
> > > I have installed Cygwin into my MS windows and also intall NCL into it. However, when I do a run test, got the error message as below.
> > > I found I don"t have "ncarg" folder in the path as "$NCARG_ROOT/lib/ncarg". Could you please give some suggestion?
> > >
> > > Thanks a lot!
> > > Mark
> > >
> > > -------NCL run test-------------------------------------------
> > > $ ncl map_only_1.ncl
> > > Copyright (C) 1995-2011 - All Rights Reserved
> > > University Corporation for Atmospheric Research
> > > NCAR Command Language Version 6.0.0
> > > The use of this software is governed by a License Agreement.
> > > See http://www.ncl.ucar.edu/ for more details.
> > > warning:Unable to Get System Resource File Name?
> > > warning:Unable to load System Resource File (null)
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > warning:Unable to Get System Resource File Name?
> > > warning:WorkstationClassInitialize:Unable to access rgb color database - named colors unsupported:[errno=2]
> > > NDV_COLORMAP_PATH environment variable not set:
> > > defaulting to .:$NCARG_ROOT/lib/ncarg/colormaps
> > > warning:["Palette.c":1527]:NhlLoadColormapFiles: Invalid directory encountered in colormap path specification
> > > fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl)
> > > fatal:error at line 9 in file map_only_1.ncl
> > >
> > > ---------NCL code-------------
> > > ;================================================;
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> > > ; ================================================;
> > > begin
> > >
> > > wks = gsn_open_wks("ps","maponly") ; open a ps file
> > > plot = gsn_csm_map_ce(wks,False) ; draw global map
> > >
> > > end
> > >
> > >
> > >
> > >
> > >
> > > From: Mark Chan <cym263@yahoo.com>
> > > Subject: NCL install into Cygwin
> > > Date: September 8, 2012 7:33:19 PM MDT
> > > To: "ncl-install@ucar.edu" <ncl-install@ucar.edu>
> > > Reply-To: Mark Chan <cym263@yahoo.com>
> > >
> > >
> > > Dear NCL developer,
> > >
> > > I have installed Cygwin into my MS windows and also intall NCL into it. However, when I do a run test, got the error message as below.
> > > I found I don"t have "ncarg" folder in the path as "$NCARG_ROOT/lib/ncarg". Could you please give some suggestion?
> > >
> > > Thanks a lot!
> > > Mark
> > >
> > > -------NCL run test-------------------------------------------
> > > $ ncl map_only_1.ncl
> > > Copyright (C) 1995-2011 - All Rights Reserved
> > > University Corporation for Atmospheric Research
> > > NCAR Command Language Version 6.0.0
> > > The use of this software is governed by a License Agreement.
> > > See http://www.ncl.ucar.edu/ for more details.
> > > warning:Unable to Get System Resource File Name?
> > > warning:Unable to load System Resource File (null)
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > warning:Unable to Get System Resource File Name?
> > > warning:WorkstationClassInitialize:Unable to access rgb color database - named colors unsupported:[errno=2]
> > > NDV_COLORMAP_PATH environment variable not set:
> > > defaulting to .:$NCARG_ROOT/lib/ncarg/colormaps
> > > warning:["Palette.c":1527]:NhlLoadColormapFiles: Invalid directory encountered in colormap path specification
> > > fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl)
> > > fatal:error at line 9 in file map_only_1.ncl
> > >
> > > ---------NCL code-------------
> > > ;================================================;
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> > > ; ================================================;
> > > begin
> > >
> > > wks = gsn_open_wks("ps","maponly") ; open a ps file
> > > plot = gsn_csm_map_ce(wks,False) ; draw global map
> > >
> > > end
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> >
> >
> >
> >
> > From: Mark Chan <cym263@yahoo.com>
> > Subject: Fw: [ncl-talk] NCL install into Cygwin
> > Date: September 13, 2012 8:53:00 PM MDT
> > To: "ncl-install@ucar.edu" <ncl-install@ucar.edu>
> > Reply-To: Mark Chan <cym263@yahoo.com>
> >
> >
> > Dear NCL developer,
> >
> > I would like to use NCL in cygwin. I want to ask why the ".bash_profile" was not executed automatically when I start up cygwin ( I have to do as "source .bash_profile" manually).
> > I know this is a linux question but I would appreciate it if you could give any help.
> >
> > With my best regards,
> > Mark
> >
> > ----- Forwarded Message -----
> > From: Mary Haley <haley@ucar.edu>
> > To: Mark Chan <cym263@yahoo.com>
> > Cc: NCL Helpline <ncl-talk@ucar.edu>
> > Sent: Wednesday, September 12, 2012 4:08 AM
> > Subject: Re: [ncl-talk] NCL install into Cygwin
> >
> > Dear Mark,
> >
> > In the future, please post NCL installation questions to ncl-install_at_ucar.edu (http://mailman.ucar.edu/mailman/listinfo/ncl-install).
> >
> > It looks like your NCARG_ROOT environment variable is not set, or is not set correctly. For information on setting NCARG_ROOT, read:
> >
> > http://www.ncl.ucar.edu/Download/install.shtml#SetNCARG_ROOT
> >
> > --Mary
> >
> > On Sep 10, 2012, at 2:27 AM, Mark Chan wrote:
> >
> > >
> > > Dear NCL developer,
> > >
> > > I have installed Cygwin into my MS windows and also intall NCL into it. However, when I do a run test, got the error message as below.
> > > I found I don"t have "ncarg" folder in the path as "$NCARG_ROOT/lib/ncarg". Could you please give some suggestion?
> > >
> > > Thanks a lot!
> > > Mark
> > >
> > > -------NCL run test-------------------------------------------
> > > $ ncl map_only_1.ncl
> > > Copyright (C) 1995-2011 - All Rights Reserved
> > > University Corporation for Atmospheric Research
> > > NCAR Command Language Version 6.0.0
> > > The use of this software is governed by a License Agreement.
> > > See http://www.ncl.ucar.edu/ for more details.
> > > warning:Unable to Get System Resource File Name?
> > > warning:Unable to load System Resource File (null)
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > warning:Unable to Get System Resource File Name?
> > > warning:WorkstationClassInitialize:Unable to access rgb color database - named colors unsupported:[errno=2]
> > > NDV_COLORMAP_PATH environment variable not set:
> > > defaulting to .:$NCARG_ROOT/lib/ncarg/colormaps
> > > warning:["Palette.c":1527]:NhlLoadColormapFiles: Invalid directory encountered in colormap path specification
> > > fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl)
> > > fatal:error at line 9 in file map_only_1.ncl
> > >
> > > ---------NCL code-------------
> > > ;================================================;
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> > > ; ================================================;
> > > begin
> > >
> > > wks = gsn_open_wks("ps","maponly") ; open a ps file
> > > plot = gsn_csm_map_ce(wks,False) ; draw global map
> > >
> > > end
> > >
> > >
> > >
> > >
> > >
> > > From: Mark Chan <cym263@yahoo.com>
> > > Subject: NCL install into Cygwin
> > > Date: September 8, 2012 7:33:19 PM MDT
> > > To: "ncl-install@ucar.edu" <ncl-install@ucar.edu>
> > > Reply-To: Mark Chan <cym263@yahoo.com>
> > >
> > >
> > > Dear NCL developer,
> > >
> > > I have installed Cygwin into my MS windows and also intall NCL into it. However, when I do a run test, got the error message as below.
> > > I found I don"t have "ncarg" folder in the path as "$NCARG_ROOT/lib/ncarg". Could you please give some suggestion?
> > >
> > > Thanks a lot!
> > > Mark
> > >
> > > -------NCL run test-------------------------------------------
> > > $ ncl map_only_1.ncl
> > > Copyright (C) 1995-2011 - All Rights Reserved
> > > University Corporation for Atmospheric Research
> > > NCAR Command Language Version 6.0.0
> > > The use of this software is governed by a License Agreement.
> > > See http://www.ncl.ucar.edu/ for more details.
> > > warning:Unable to Get System Resource File Name?
> > > warning:Unable to load System Resource File (null)
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > fatal:GetSysAppDir:Unable to get a default value for the system App Resource directory
> > > warning:["Resources.c":734]:Unable to set appSysDir to default value - Using NULL
> > > warning:Unable to Get System Resource File Name?
> > > warning:WorkstationClassInitialize:Unable to access rgb color database - named colors unsupported:[errno=2]
> > > NDV_COLORMAP_PATH environment variable not set:
> > > defaulting to .:$NCARG_ROOT/lib/ncarg/colormaps
> > > warning:["Palette.c":1527]:NhlLoadColormapFiles: Invalid directory encountered in colormap path specification
> > > fatal:Could not open ($NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl)
> > > fatal:error at line 9 in file map_only_1.ncl
> > >
> > > ---------NCL code-------------
> > > ;================================================;
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> > > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> > > ; ================================================;
> > > begin
> > >
> > > wks = gsn_open_wks("ps","maponly") ; open a ps file
> > > plot = gsn_csm_map_ce(wks,False) ; draw global map
> > >
> > > end
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> >
> >
> >
> > _______________________________________________
> > ncl-install mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
>
>

_______________________________________________
ncl-install mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-install
Received on Mon Sep 17 09:49:08 2012

This archive was generated by hypermail 2.1.8 : Fri Sep 21 2012 - 16:25:08 MDT