Browse code

bash_profile (heron) - v2.3 - See Versions section for details

Fred authored on10/03/2019 22:28:44
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 2.2
3
+# Version: 2.3
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2017-04-23
5
+# Modified in: 2019-03-10
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v2.3 - 2019-03-10: alias updated / R hack for medusa2 added / no ssh key usage or storage for heron
12 13
 # v2.2 - 2017-04-23: server name updated / SSH connection through screen improved / welcome message improved
13 14
 # v2.1 - 2016-07-25: bug about space corrected / exit if not interactive (due to Grid Engine)
14 15
 # v2.0 - 2016-06-12: PATH setup improved / start_agent with multikey management / start_agent calling improved / screen behaviour added / welcome message improved / alias updated
... ...
@@ -53,7 +54,8 @@ alias pqrsh='qrsh -V -cwd -pty y bash -li'
53 54
 alias plocate='locate -d "$mlocate_db"'
54 55
 alias xterm='xterm -bg black -fg white -rightbar -geometry 200x35'
55 56
 
56
-alias medusa='ssh medusa'
57
+[[ $HOSTNAME =~ heron* ]] && alias ssh="ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no"
58
+alias medusa2='ssh medusa2'
57 59
 alias perseus='ssh perseus'
58 60
 alias mendel='ssh mendel'
59 61
 alias crow='ssh crow'
... ...
@@ -80,6 +82,7 @@ export LC_NUMERIC=en_US.UTF-8   # To always have . as decimal separator
80 82
 export LC_NAME=en_US.UTF-8
81 83
 LC_ALL=
82 84
 
85
+bind 'set show-all-if-unmodified off'
83 86
 
84 87
 #-------#
85 88
 # Paths #
... ...
@@ -102,6 +105,9 @@ then
102 105
     export PATH=$PATH:/opt/openmpi/bin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/hmmer/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/eclipse:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/rocks/bin:/opt/rocks/sbin:/opt/condor/bin:/opt/condor/sbin:/opt/gridengine/bin/lx26-amd64:/usr/bin:/usr/local/bin:/bin:/usr/java/latest/bin
103 106
     # Grid Engine path
104 107
     export PATH=$PATH:/opt/gridengine/bin/linux-x64
108
+    # R
109
+    echo -e "\n\e[33mWarning:\e[00m Hard alias for R. If not needed, please edit .bash_profile.\n"
110
+    alias R="$HOME/local/pckg/R-3.3.1/bin/R"
105 111
 fi
106 112
 
107 113
 # Perl
... ...
@@ -154,7 +160,7 @@ SSH_KEY_LIST="$HOME/.ssh/key_list"  # File with full path of keys (one per line)
154 160
 [[ -f "$SSH_KEY_LIST" ]] && SSH_KEYS=($(cat $SSH_KEY_LIST))
155 161
 #lifetime="-t 259200" # seconds => 3 days
156 162
 
157
-if [[ ! $HOSTNAME =~ compute.* ]]
163
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ compute.*) ]]
158 164
 then
159 165
     if [[ -n "$SSH_CONNECTION" ]]
160 166
     then
... ...
@@ -177,7 +183,7 @@ fi
177 183
 
178 184
 # Display forwarding
179 185
 # dependency: proxy-dsiplay
180
-if [[ ! ($HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
186
+if [[ ! ($HOSTNAME =~ heron* || $HOSTNAME =~ perseus* || $HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
181 187
 then
182 188
     proxy-display :99
183 189
 fi