e7a5bab4bf08f59c567712169877cf4401fe7b9d
capsules.md
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | - [Usage - Capsule Environment for SBGrid](#usage-capsule-environment-for-sbgrid) |
7 | 7 | - [Overrides - managing versions :](#usage-capsule-environment-for-sbgrid_overrides-managing-versions) |
8 | 8 | - [Managing Duplicate executables](#usage-capsule-environment-for-sbgrid_managing-duplicate-executables) |
9 | + - [Managing Duplicate with userpath](#usage-capsule-environment-for-sbgrid_managing-duplicate-userpath) |
|
9 | 10 | - [EXAMPLES:](#usage-capsule-environment-for-sbgrid_examples) |
10 | 11 | |
11 | 12 | <a name="overview"></a> |
... | ... | @@ -102,15 +103,30 @@ In some cases an executable may exist in multiple applications, i.e. the program |
102 | 103 | |
103 | 104 | You can override the default in 4 ways. They are |
104 | 105 | |
105 | -1. Command Line arguments selct the application for a single command : |
|
106 | +1. Command Line arguments select the application for a single command : |
|
106 | 107 | **--sbapp:a <appname>** runs the executable from "appname" or |
107 | 108 | **--sbapp:s** select application from a list |
108 | 109 | |
109 | -2. Environment variable of the form ```_<APPLICATION>```, an underscore followed by executable in UPPER CASE. e.g. ```_XIA2=dials``` will use xia2 executable from "dials". |
|
110 | +2. Environment variable of the form ```_<EXECUTABLE>```, an underscore followed by executable in UPPER CASE. e.g. ```_XIA2=dials``` will use xia2 executable from "dials". |
|
110 | 111 | |
111 | 112 | 3. A User Config_file in *~/.sbgrid_capsule/<execname>*. e.g. echo dials > ~/.sbgrid_capsules/xia2 will uset the shell to always use the xia2 from "dials" |
112 | 113 | |
113 | -4. A localsite file in */programs/local/capsule/${SB_ARCH}/defaults/execname* |
|
114 | +4. A localsite file in *${SB_BASE}/local/capsule/${SB_ARCH}/defaults/execname* |
|
115 | + |
|
116 | +<a name="usage-capsule-environment-for-sbgrid_managing-duplicate-userpath"></a> |
|
117 | +### Managing Duplicate with userpath |
|
118 | + |
|
119 | +Sometimes a duplicate occurs with an executable that is outside of the SBGrid or BioGrids software tree. For example xterm on x86_64-linux is provided by sbgrid and usually provided by the operating system. A user may use the "userpath" directive to select the one that is accessible from the PATH prior to sourcing the SBGrid/BioGrids environment. |
|
120 | + |
|
121 | +1. Command Line arguments select the application for a single command : |
|
122 | + **--sbapp:s** select application from a list |
|
123 | + |
|
124 | +2. Environment variable of the form ```_<EXECUTABLE>```, an underscore followed by executable in UPPER CASE. e.g. ```_XTERM=userpath``` will use xterm fromt he user's original path. |
|
125 | + |
|
126 | +3. A User Config_file in *~/.sbgrid_capsule/<execname>*. e.g. ```echo userpath > ~/.sbgrid_capsules/xterm ``` will set the SBGrid/BioGrids shells to alwasy use the user's path. |
|
127 | + |
|
128 | +4. A localsite file in *${SB_BASE}/local/capsule/${SB_ARCH}/defaults/execname* |
|
129 | + |
|
114 | 130 | |
115 | 131 | <a name="usage-capsule-environment-for-sbgrid_examples"></a> |
116 | 132 | ### EXAMPLES: |
... | ... | @@ -154,4 +170,27 @@ List all 'refine' executables and select ( and run ) the version from buster |
154 | 170 | /programs/x86_64-linux/buster/20160324/autoBUSTER/bin/linux64/refine |
155 | 171 | |
156 | 172 | |
173 | +List all applications that provide xterm, select userpath, make it my default |
|
174 | +``` |
|
175 | + -bash-4.1$ xterm --sbwhich |
|
176 | + /programs/x86_64-linux/system/xterm/327/bin/xterm |
|
177 | + |
|
178 | + -bash-4.1$ xterm --sbapp:l |
|
179 | + xterm |
|
180 | + /usr/bin/xterm |
|
181 | + |
|
182 | + -bash-4.1$ env _XTERM=userpath xterm --sbwhich |
|
183 | + /usr/bin/xterm |
|
184 | + |
|
185 | + -bash-4.1$ xterm --sbapp:s --sbwhich |
|
186 | + 1) xterm |
|
187 | + 2) userpath |
|
188 | + 3) Cancel |
|
189 | + Please select application 2 |
|
190 | + /usr/bin/xterm |
|
191 | + |
|
192 | + -bash-4.1$ echo uerpath > ~/.sbgrid_capsules/xterm |
|
193 | +``` |
|
194 | + |
|
157 | 195 | Please report any bugs to bugs@sbgrid.org |
196 | + |