Customize shell: Difference between revisions
Jump to navigation
Jump to search
(Created page with "How to customize .cshrc There are four parts: 1) set up a custom DOCK_BASE, SOFT if required 2) set up standard shell variables (vars.csh) 3) custom paths, environment 4) def...") |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
How to customize .cshrc | How to customize .cshrc. There are four parts: | ||
* 1) Define a custom DOCK_BASE if you are not using the lab default | |||
* 2) Set up standard shell variables (vars.csh), the "nouns" of what you will use. | |||
* 3) Define personal customization of and exceptions to the standard environment. | |||
* 4) Define the environment (env.csh), the "verbs" that enable the software. | |||
First let's look at the standard file, which you can get from /raid3/software/labenv/defaults.cshrc: | |||
First let's look at the standard file: | |||
# .cshrc | # .cshrc | ||
#setenv DOCK_BASE /raid1/people/jji/dockenv | #setenv DOCK_BASE /raid1/people/jji/dockenv | ||
Line 22: | Line 20: | ||
Notes: | Notes: | ||
1) If you have your own dockenv, or you want to use one other than the lab default, you must set up DOCK_BASE before sourcing vars.csh | * 1) If you have your own dockenv, or you want to use one other than the lab default, you must set up DOCK_BASE before sourcing vars.csh | ||
2) If you have all you software (Schrodinger, Openeye, etc) installed elsewhere, you need to set SOFT before sourcing vars.csh. Generally, you don't want this. | * 2) If you have all you software (Schrodinger, Openeye, etc) installed elsewhere, you need to set SOFT before sourcing vars.csh. Generally, you don't want this. | ||
3) You can override individual choices of software packages between vars.csh and env.csh by setting ENV_* variables. To see what these are, do | * 3) You can override individual choices of software packages between vars.csh and env.csh by setting ENV_* variables. To see what these are, do | ||
printenv | grep ENV_ | printenv | grep ENV_ | ||
4) Thus say you want to use the 2012-10 version of Schrodinger instead of the default current version. You would add the following line after source vars.csh: | * 4) Thus say you want to use the 2012-10 version of Schrodinger instead of the default current version. You would add the following line after source vars.csh: | ||
setenv ENV_SCHRODINGER $SOFT/schrodinger/2012-10/env.csh | setenv ENV_SCHRODINGER $SOFT/schrodinger/2012-10/env.csh | ||
Then, in env.csh, the file pointed to by ENV_SCHRODINGER will be sourced to set up the correct enviroment. Note that ENV_SCHRODINGER can point anywhere, including to places in your own home directory. | Then, in env.csh, the file pointed to by ENV_SCHRODINGER will be sourced to set up the correct enviroment. Note that ENV_SCHRODINGER can point anywhere, including to places in your own home directory. | ||
[[ | Warnings: | ||
* 1) We do not recommend that you make personal copies of env.csh and vars.csh. Using the system standards means that you are more likely to stay in sync with standard lab practice. | |||
* 2) If you want to use software that is not available in the lab (or a more recent version of something we do have), please advise your [[Sysadmin]]. If more than one person uses the software, it probably makes sense to install it somewhere central. Doing so proactively retards the progress towards chaos, and probably saves you and your colleagues time, even in the short term. | |||
[[Category:Internal]] |
Latest revision as of 00:24, 23 October 2012
How to customize .cshrc. There are four parts:
- 1) Define a custom DOCK_BASE if you are not using the lab default
- 2) Set up standard shell variables (vars.csh), the "nouns" of what you will use.
- 3) Define personal customization of and exceptions to the standard environment.
- 4) Define the environment (env.csh), the "verbs" that enable the software.
First let's look at the standard file, which you can get from /raid3/software/labenv/defaults.cshrc:
# .cshrc #setenv DOCK_BASE /raid1/people/jji/dockenv # # initial step source /raid3/software/labenv/vars.csh # # custom changes here setenv EDITOR vi unset autologout # # final step source $SOFT/labenv/env.csh
Notes:
- 1) If you have your own dockenv, or you want to use one other than the lab default, you must set up DOCK_BASE before sourcing vars.csh
- 2) If you have all you software (Schrodinger, Openeye, etc) installed elsewhere, you need to set SOFT before sourcing vars.csh. Generally, you don't want this.
- 3) You can override individual choices of software packages between vars.csh and env.csh by setting ENV_* variables. To see what these are, do
printenv | grep ENV_
- 4) Thus say you want to use the 2012-10 version of Schrodinger instead of the default current version. You would add the following line after source vars.csh:
setenv ENV_SCHRODINGER $SOFT/schrodinger/2012-10/env.csh
Then, in env.csh, the file pointed to by ENV_SCHRODINGER will be sourced to set up the correct enviroment. Note that ENV_SCHRODINGER can point anywhere, including to places in your own home directory.
Warnings:
- 1) We do not recommend that you make personal copies of env.csh and vars.csh. Using the system standards means that you are more likely to stay in sync with standard lab practice.
- 2) If you want to use software that is not available in the lab (or a more recent version of something we do have), please advise your Sysadmin. If more than one person uses the software, it probably makes sense to install it somewhere central. Doing so proactively retards the progress towards chaos, and probably saves you and your colleagues time, even in the short term.