Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
services:modules [2019/07/25 13:28] giunta [Controlling Modules During Login] |
services:modules [2019/07/25 14:28] giunta [Controlling Modules During Login] |
||
---|---|---|---|
Line 73: | Line 73: | ||
This will search any help message or whatis description for the word(s) given on the command line. | This will search any help message or whatis description for the word(s) given on the command line. | ||
- | Another way to search for modules is with the ''module spider''command. This command searches the entire list of possible modules. The difference between ''module avail'' and ''module spider'' is explained in the [[services:modules#module_hierarchy|Module Hierarchy]] and [[services:modules#searching_for_modules|Searching for Modules]] section.: | + | Another way to search for modules is with the ''module spider''command. This command searches the entire list of possible modules. The difference between ''module avail'' and ''module spider'' is explained in the [[services:modules#module_hierarchy|Module Hierarchy]] and [[services:modules#searching_for_modules|Searching for Modules]] section: |
$ module spider | $ module spider | ||
Line 174: | Line 174: | ||
===== Controlling Modules During Login ===== | ===== Controlling Modules During Login ===== | ||
- | Users can automatically load a standard set of modules when log in adding module commands to their //personal startup files//. To add module commands to users’ startup scripts, Bash users need to place the following in their ''~/.bashrc'' file: | + | <note warning>Automatically loaded modules may have a negative effect on GNOME graphical login</note> |
+ | |||
+ | Users can automatically load a standard set of modules when log in, adding module commands to their //personal startup files//. To add module commands to users’ startup scripts, Bash users need to place the following in their ''~/.bashrc'' file: | ||
<code> | <code> | ||
Line 196: | Line 198: | ||
</code> | </code> | ||
- | If users had created at least a default collection | + | If users have created at least a default collection (see [[services:modules#user_collections|User Collections]] for more details), they can replace all ''module load ...'' commands with a single ''module restore''. Bash users need to place the following in their ''~/.bashrc'' file: |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | To add module commands to users’ startup scripts, Bash users need to place the following in their ''~/.bashrc'' file: | + | |
<code> | <code> | ||
Line 212: | Line 209: | ||
</code> | </code> | ||
- | Csh users need specify the module commands in their ''~/.cshrc'' file: | + | Csh users need specify the ''module restore'' command in their ''~/.cshrc'' file: |
<code> | <code> | ||
Line 222: | Line 219: | ||
endif | endif | ||
</code> | </code> | ||
+ | |||
+ | ==== Tips for graphical login ==== | ||
+ | |||
+ | When using automatically loaded modules, to avoid problems on GNOME login, a possible solution could be testing ''TERM'' environment variable. On SISSA linux workstation, //GNOME Terminal// sets it as ''xterm-256color''. Bash users may add a test on ''TERM'' variable in their ''~/.bashrc'': | ||
+ | |||
+ | <code> | ||
+ | if [ "$TERM" == "xterm-256color" -a -z "$BASHRC_READ" ]; then | ||
+ | export BASHRC_READ=1 | ||
+ | # Place any module commands here | ||
+ | # module load git | ||
+ | fi | ||
+ | </code> | ||
+ | |||
+ | Csh users need to add in their ''~/.cshrc'' file: | ||
+ | |||
+ | <code> | ||
+ | if ( "$TERM" == "xterm-256color" && ! $?CSHRC_READ ) then | ||
+ | setenv CSHRC_READ 1 | ||
+ | # Place any module command here | ||
+ | # module load git | ||
+ | endif | ||
+ | </code> | ||
+ | |||
===== User Collections ===== | ===== User Collections ===== | ||