From 6c0dcace0f7e0f561eeb180be172bddc6728414c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 26 Feb 2006 22:11:05 +0000 Subject: Handle urxvt (and then force TERM=rxvt, as TERM=rxvt-unicode is unsupported on Debian Sarge). --- xsh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'xsh') 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 -- cgit v1.2.3