Browse code

bash_profile (heron) - v1.8 - Add proxy-display

Fred authored on02/12/2014 17:49: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: 1.7
3
+# Version: 1.8
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-10-22
5
+# Modified in: 2014-12-02
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.8 - 2014-12-02: proxy-display added (resolve $DISPLAY problem with screen)
12 13
 # v1.7 - 2014-10-22: alias added / conditional modification of PATH and Ld_LIBRARY_PATH to be able to use eog and evince on other server (crow, ...)
13 14
 # v1.6 - 2014-10-15: alias added / LC* added / LS_COLORS removed / PATH updated / LD_LIBRARY_PATH updated
14 15
 # v1.5 - 2014-09-30: improve screen session detection to print welcome message at server connection even if screen session is running elsewhere
... ...
@@ -132,6 +133,13 @@ then
132 133
     fi
133 134
 fi
134 135
 
136
+# Display forwarding
137
+# dependency: proxy-dsiplay
138
+if [[ ! ($HOSTNAME =~ medusa* || $HOSTNAME =~ compute.*) && -n "$DISPLAY" && $(which proxy-display &> /dev/null; echo $?) == 0 ]]
139
+then
140
+    proxy-display :99
141
+fi
142
+
135 143
 
136 144
 
137 145
 #=================#