From 7b6a31d40f68a00e61561ce1544259e007f978c5 Mon Sep 17 00:00:00 2001 From: Mitchell Dzurick Date: Thu, 8 Feb 2024 13:31:33 -0700 Subject: [PATCH] bashrc: export BYOBU_RUN_DIR and BYOBU_PREFIX This is to address https://launchpad.net/bugs/2051995 where users will see the phrase bash: /timer.6217: Permission denied Whenever any command is ran. This occurs because byobu-prompt uses this bashrc and tries to write to $BYOBU_RUN_DIR/timer.$$ but BYOBU_RUN_DIR is not yet defined. This caused byobu to try to write to /timer.$$ which fails as a regular user. Also added BYOBU_PREFIX in-case the user sets BYOBU_DISTRO to Ubuntu. Signed-off-by: Mitchell Dzurick --- usr/share/byobu/profiles/bashrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/share/byobu/profiles/bashrc b/usr/share/byobu/profiles/bashrc index 1455193e..3890cc1c 100644 --- a/usr/share/byobu/profiles/bashrc +++ b/usr/share/byobu/profiles/bashrc @@ -25,6 +25,8 @@ case "$TERM" in esac [ -n "$BYOBU_CHARMAP" ] || BYOBU_CHARMAP=$(locale charmap 2>/dev/null || echo) [ -z "$USER" ] && export USER=$(whoami) +[ -z "$BYOBU_RUN_DIR" ] && export BYOBU_RUN_DIR=/tmp +[ -z "$BYOBU_PREFIX" ] && export BYOBU_PREFIX=/usr byobu_prompt_status() { local e=$?; [ $e != 0 ] && echo -e " $e "; } byobu_prompt_symbol() { [ "$USER" = "root" ] && printf "%s" "#" || printf "%s" "\$"; } byobu_prompt_runtime() {