]> err.no Git - dotfiles/commitdiff
handle xterm through what is available, not where we are.
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Sun, 16 Jan 2005 22:38:11 +0000 (22:38 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Sun, 16 Jan 2005 22:38:11 +0000 (22:38 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@714 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

environment

index 697b11581b931ba6bb8d4b3ab3e09ce0dd7e7da0..c73c25040b9d8c49fbd87b22eacee258a4cff3e2 100644 (file)
@@ -10,6 +10,16 @@ if [ `uname -s` = "FreeBSD" ] && alias | grep -q "ls="; then
     unalias ls
 fi
 
+findcommand() {
+    notfound=1
+    while [ "$notfound" -eq "1" ]; do
+        COMMAND=$(command -v "$1")
+        notfound=$?
+        shift
+    done
+    echo $COMMAND
+}
+
 blog () {
     pushd $(pwd)
     if [ ! -d "$HOME/blog" ]; then
@@ -129,7 +139,7 @@ DEBEMAIL=tfheen@debian.org
 DEBFULLNAME="Tollef Fog Heen"
 CVSEDITOR=vi
 SVN_EDITOR=vi
-XTERM=xterm
+XTERM=$(findcommand pterm Eterm gnome-terminal xterm)
 PAGER=less
 GNUSTEP_USER_ROOT="$HOME/.GNUstep"
 
@@ -187,16 +197,6 @@ case "$HOSTNAME" in
 esac
 
 case "$DOMAINNAME" in
-    idi.ntnu.no|stud.ntnu.no|*raw.no)
-        XTERM=Eterm
-    ;;
-        # Sigh, no locale here, at least not uniformly.
-#        case "$HOSTNAME" in
-#            arabella*)
-#                export LANG=no_NO
-#                ;;
-#        esac
-#        ;;
     samfundet*)
         mesg y
         EMAIL=tfheen@samfundet.no
@@ -206,12 +206,6 @@ case "$DOMAINNAME" in
         ;;
 esac
 
-case "$HOSTNAME" in
-    yiwaz*)
-        XTERM=Eterm
-        ;;
-esac
-
 removepathelem "\\."
 
 export LS_OPTIONS CVSROOT EDITOR TZ WWW_HOME LESSOPEN LESS RSYNC_RSH