summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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