Windows
Login files contain commands that are run automatically at login. There are two:
- login.bat, located in H:\CTC Tools\, is run for everyone on the system. The commands
it runs include changing to the user's home directory and setting up temporary space.
The last thing it does is run userlogin.bat from the user's home directory, if it
is present.
- userlogin.bat, located in your home directory, can be used if you want to customize
your environment at login, or there are commands that you want run each time you
log in.
In effect, login.bat runs when you login. Specifically, login.bat runs when
- you (or a program you run) open a Command Prompt on a winlogin machine or on a collaboratory
machine.
- you ssh to a CTC login machine or use a remote desktop connection to a compute machine.
- your batch job begins
- userlogin.bat, located in your home directory, can be used if you want to customize
your environment at login, or there are commands that you want run each time you
log in.
You can write userlogin.bat from scratch, or you may want to start with a template
provided in H:\CTC Tools\userlogin.bat. This template contains many typical commands,
with all actions commented out. If, for example, you want to be able to use EMACS
as your editor, or you often run Fluent on the batch nodes, you should make
a copy of userlogin.bat, edit it to uncomment the appropriate setup commands and save it
as H:\users\your_userid\userlogin.bat.
Linux
- bash (default) shell:
- runs ~/.profile (.profile in your home directory) at login.
- if you prefer tcsh to be your main shell, put "tcsh" as the last line in .profile
- tcsh shell:
- runs ~/.tcshrc and ~/.cshrc when started
- also runs ~/.login when started with "tcsh -l"
- NOTE: Currently, Chsh fails on linuxlogin. Workaround: Put the following
in your ~/.profile, substituting your favorite shell for /bin/tcsh. Available shells
are listed in /etc/shells.
SHELL=/bin/tcsh
export SHELL
exec $SHELL -l
Your Turn
Copy userlogin.bat to H:\users\your_userid\ using one of these methods:
Try it!|
Drag-and-Drop |
Command
Prompt
Now edit userlogin.bat and uncomment the lines you wish to execute.
Progressive Lab
At this point you are ready to begin the Progressive Lab Exercise.
Go to the Logon and Copy Files section for Linux or Windows and
follow the instructions. This step is a prerequisite for the subsequent sections
of the lab.