diff --git a/debian/changelog b/debian/changelog index e787db8a..25264011 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ byobu (5.128) unreleased; urgency=medium usr/bin/byobu-janitor.in: - Test if $HOME/.bashrc exists before modifying it (and potentially creating it) + * usr/bin/byobu.in: + - Use readlink if the tty command is not available * usr/lib/byobu/disk_io: - Ensure the detected mount point device exists * usr/lib/byobu/hostname: diff --git a/usr/bin/byobu.in b/usr/bin/byobu.in index b4df33ae..fc5096f4 100755 --- a/usr/bin/byobu.in +++ b/usr/bin/byobu.in @@ -62,7 +62,11 @@ esac export BYOBU_BACKEND # Store the parent tty -export BYOBU_TTY=$(tty) +if eval $BYOBU_TEST tty >/dev/null 2>&1; then + export BYOBU_TTY=$(tty) +else + export BYOBU_TTY=$(readlink /proc/$$/fd/0) +fi # Get the default window name [ -n "$BYOBU_WINDOW_NAME" ] || BYOBU_WINDOW_NAME=-