diff --git a/debian/changelog b/debian/changelog index 52b7a82b..fb3a0871 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,9 @@ byobu (5.2) unreleased; urgency=low ctrl-shift-left/right; seems alt-left-right are used by irssi * README: LP: #911825 - add note about tmux version required + * usr/lib/byobu/include/common: LP: #911149 + - when backend is not automatically set, check if screen or tmux + is installed on the system before setting the default backend -- Dustin Kirkland Thu, 29 Dec 2011 12:28:51 -0600 diff --git a/usr/lib/byobu/include/common b/usr/lib/byobu/include/common index 80ccee8c..d6ade629 100755 --- a/usr/lib/byobu/include/common +++ b/usr/lib/byobu/include/common @@ -27,7 +27,16 @@ if [ -z "${BYOBU_INCLUDED_LIBS}" ]; then [ -r "/etc/$PKG/backend" ] && . "/etc/$PKG/backend" [ -r "$BYOBU_CONFIG_DIR/backend" ] && . "$BYOBU_CONFIG_DIR/backend" # Just in case there's no config file at all - [ -z "${BYOBU_BACKEND}" ] && BYOBU_BACKEND=tmux + if [ -z "${BYOBU_BACKEND}" ]; then + # If tmux is installed, use it + if command -v tmux >/dev/null; then + BYOBU_BACKEND=tmux + elif command -v screen >/dev/null; then + BYOBU_BACKEND=screen + else + echo "ERROR: $PKG won't work without tmux or screen installed" 1>&2 + fi + fi fi # Creating backend cache