Changeset 39326
- Timestamp:
- Sep 29, 2009, 6:36:06 AM (15 years ago)
- File:
-
- 1 edited
-
grass/branches/develbranch_6/lib/init/grass.src (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
grass/branches/develbranch_6/lib/init/grass.src
r31958 r39326 23 23 export GISBASE 24 24 25 exec "$GISBASE/etc/Init.sh" "$@" 25 GISRCRC="$HOME/.grassrc6" 26 27 if [ -n "$GRASS_BATCH_JOB" ] ; then 28 exec "$GISBASE/etc/Init.sh" "$@" 29 fi 30 31 if test -t 0; then 32 # We are running from some terminal (i.e. xterm). 33 exec "$GISBASE/etc/Init.sh" "$@" 34 else 35 # We are running headless... 36 if [ ! -f "$GISRCRC" ] ; then 37 # First time user... 38 ( exec xdg-terminal -e $0 "$@" ) &>/dev/null 39 # If there is no xdg-terminal, then fall back to xterm 40 ( exec xterm -e $0 "$@" ) &>/dev/null 41 else 42 # Returning user may have preffered GRASS terminal application 43 GRASS_XTERM=`awk '/GRASS_XTERM/ {print $2}' "$GISRCRC" 2>/dev/null` 44 if [ -n "$GRASS_XTERM" ]; then 45 # User has preffered GRASS terminal app 46 ( exec $GRASS_XTERM -e $0 "$@" ) &>/dev/null 47 else 48 # Starting user's preffered terminal app 49 ( exec xdg-terminal -e $0 "$@" ) &>/dev/null 50 # If there is no xdg-terminal, then fall back to xterm 51 ( exec xterm -e $0 "$@" ) &>/dev/null 52 fi; 53 fi; 54 fi; 55 56 exit 1; # If we got so far, it's an error. 57
Note:
See TracChangeset
for help on using the changeset viewer.
