summaryrefslogtreecommitdiff
path: root/xsh
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2006-02-26 22:11:05 +0000
committerJonas Smedegaard <dr@jones.dk>2006-02-26 22:11:05 +0000
commit6c0dcace0f7e0f561eeb180be172bddc6728414c (patch)
tree6432b64fa7ca0bfbef14a7bb33d44f59bcdc08b3 /xsh
parent9e1d47659b61c38630f25d0c31639a775513c8c8 (diff)
Handle urxvt (and then force TERM=rxvt, as TERM=rxvt-unicode is unsupported on Debian Sarge).
Diffstat (limited to 'xsh')
-rwxr-xr-xxsh27
1 files changed, 16 insertions, 11 deletions
diff --git a/xsh b/xsh
index bc154e8..707ba95 100755
--- a/xsh
+++ b/xsh
@@ -14,16 +14,6 @@ function termwrapper () {
sleep 4
fi
- case `readlink /etc/alternatives/x-terminal-emulator | xargs basename` in
-# rxvt*) opts="+sb -sl 500 -n \"$titletext\""; titleoptname="-title";;
- rxvt*) opts="+sb -sl 500"; titleoptname="-title";;
- *xterm) opts="+sb -sl 500 +wc"; titleoptname="-title";;
- gnome-terminal) opts=""; titleoptname="--title";;
- gnome-terminal.wrapper) opts=""; titleoptname="-title";;
- konsole*) opts="--notoolbar"; titleoptname="-T";;
- *) opts=""; titleoptname="-T";;
- esac
-
if [ -n "$PRG" ]; then
# x-terminal-emulator +sb -sl 500 -n "$title" -title "$title" --title "$title" -e $PRG &
x-terminal-emulator $opts $titleoptname "$titletext" -e $PRG &
@@ -94,6 +84,17 @@ if [ $HOST != "localhost" ]; then
ssh_opts="-C $ssh_opts"
fi
+case `readlink /etc/alternatives/x-terminal-emulator | xargs basename` in
+# rxvt*) opts="+sb -sl 500 -n \"$titletext\""; titleoptname="-title";;
+ rxvt*) opts="+sb -sl 500"; titleoptname="-title";;
+ urxvt*) opts="+sb -sl 500"; titleoptname="-title"; term="rxvt";;
+ *xterm) opts="+sb -sl 500 +wc"; titleoptname="-title";;
+ gnome-terminal) opts=""; titleoptname="--title";;
+ gnome-terminal.wrapper) opts=""; titleoptname="-title";;
+ konsole*) opts="--notoolbar"; titleoptname="-T";;
+ *) opts=""; titleoptname="-T";;
+esac
+
# Pause for a moment if verbose
if [ "$V" = 1 ]; then
prg_opts="$prg_opts; sleep 4"
@@ -115,7 +116,11 @@ case $prg_base in
esac
prg_local="$prg_base $prg_opts_local"
-prg_remote="bash --login -i -c \"test -e /etc/debian_version || export TERM=xterm; $prg_base $prg_opts_remote\""
+if [ -n "$term" ]; then
+ prg_remote="bash --login -i -c \"test -e /etc/debian_version && export TERM=rxvt || export TERM=xterm; $prg_base $prg_opts_remote\""
+else
+ prg_remote="bash --login -i -c \"test -e /etc/debian_version || export TERM=xterm; $prg_base $prg_opts_remote\""
+fi
prg_remote_suu="echo -n 'Changing to root...: '; su $su_opts -c \"cd; $prg_base $prg_opts_remote\""
if [ "$SU" != 1 ]; then