Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 2a529f534c
Fetching contributors…

Cannot retrieve contributors at this time

executable file 39 lines (29 sloc) 1.001 kb
#!/bin/sh
# vim:set et sw=2:
# Analyzes what terminal emulators are installed and picks my favorite from the
# bunch.
if [ -z "$DISPLAY" ]; then
echo "No display set. Aborting." >&2
exit 2
elif [ "$1" = "-E" ]; then
term="$2"; shift 2
exec "$term" "$@"
fi
[ -n "$XTERM" ] && [ -x "`which $XTERM 2>/dev/null`" ] && exec "$XTERM" "$@"
# NOT exported
[ -z "$RXVT_SOCKET" ] && RXVT_SOCKET="$HOME/.rxvt-unicode-`hostname`"
if [ -S "$RXVT_SOCKET" -a -x "`which urxvtc 2>/dev/null`" ]; then
urxvtc --help 2>/dev/null
[ "$?" = 1 ] && exec urxvtc "$@"
fi
[ -x "`which urxvt 2>/dev/null`" ] && exec urxvt "$@"
[ "0$LC_ALL" -eq 0 ] && LC_ALL=
for dir in /opt/sfw/bin /usr/local/bin /usr/X11R6/bin; do
[ -x $dir/xterm ] && exec $dir/xterm "$@"
done
[ -x /usr/bin/xterm ] && exec /usr/bin/xterm -u8 "$@"
for term in rxvt aterm konsole gnome-multi-terminal gnome-terminal dtterm; do
[ -x "`which $term 2>/dev/null`" ] && exec $term "$@"
done
echo "No terminal emulators found." >&2
exit 1
Jump to Line
Something went wrong with that request. Please try again.