byobu doesn't set bash prompt properly

Bug #1280550 reported by Arminius Silvanus
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Medium
Dustin Kirkland 
byobu (Ubuntu)
Fix Released
Medium
Dustin Kirkland 

Bug Description

I normally use zsh, but occasionally I switch to bash. In that case, the bashrc in /usr/share/byobu/profiles/bashrc doesn't set my prompt like it should do.

I've done a bit of research on it - byobu's bashrc checks for the environment variable SHELL, which is set to the user's _preferred_ shell, not the currently running shell (see http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08). In my case, SHELL points to /usr/bin/zsh, regardless whether I'm running zsh or bash.

The correct way to check if bash is running is to check for the environment variable BASH. I've attached a patch that does just that.

Tags: patch
Revision history for this message
Arminius Silvanus (arminius-silvanus) wrote :
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

bzr commit -m '* usr/share/byobu/profiles/bashrc: LP: #1280550
  - test the $BASH variable, rather than $SHELL, to tell if we're
    running in a bash environment' --fixes 'lp:1280550'
Committing to: /home/local/media/source/byobu/byobu/
modified debian/changelog
modified usr/share/byobu/profiles/bashrc
Committed revision 2293.

Changed in byobu:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland  (kirkland)
Changed in byobu (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland  (kirkland)
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Fixed-bash-env-var-check.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package byobu - 5.74-0ubuntu1

---------------
byobu (5.74-0ubuntu1) trusty; urgency=low

  [ Dustin Kirkland ]
  * usr/lib/byobu/include/ec2instancespricing.py: LP: #1286367
    - merged in updated instance pricing script from
      https://github.com/erans/ec2instancespricing
  * usr/share/byobu/profiles/tmux: LP: #1273685
    - remove double sourcing of local .tmux.conf
  * usr/lib/byobu/battery: LP: #1270451
    - add support for yet another batter type (Android)
    - thanks to Felix Krull for the initial patch
  * usr/share/byobu/profiles/tmux: LP: #1270551
    - enable ctrl-left and ctrl-right to move among words

  [ Chris Johnston ]
  * usr/share/man/man1/byobu-layout.1: LP: #1288738
    - fix manpage typo

  [ Mike Miller ]
  * usr/lib/byobu/logo: LP: #1278006
    - fix RHEL detection for logo

  [ Daniel Hahler ]
  * usr/bin/byobu-keybindings: LP: #1258093
    - fix toggling of f-keys
  * usr/share/byobu/profiles/tmux: LP: #1258534
    - ensure that we respect BYOBU_NO_TITLE in tmux

  [ Ryo ONODERA ]
  * configure.ac, etc/profile.d/Z97-byobu.sh => etc/profile.d/Z97-
    byobu.sh.in, usr/bin/byobu-config => usr/bin/byobu-config.in,
    usr/bin/byobu-ctrl-a => usr/bin/byobu-ctrl-a.in, usr/bin/byobu-
    disable-prompt => usr/bin/byobu-disable-prompt.in, usr/bin/byobu-
    disable => usr/bin/byobu-disable.in, usr/bin/byobu-enable-prompt =>
    usr/bin/byobu-enable-prompt.in, usr/bin/byobu-enable =>
    usr/bin/byobu-enable.in, usr/bin/byobu-export => usr/bin/byobu-
    export.in, usr/bin/byobu-janitor => usr/bin/byobu-janitor.in,
    usr/bin/byobu-launcher-install => usr/bin/byobu-launcher-install.in,
    usr/bin/byobu-launcher-uninstall => usr/bin/byobu-launcher-
    uninstall.in, usr/bin/byobu-launcher => usr/bin/byobu-launcher.in,
    usr/bin/byobu-launch => usr/bin/byobu-launch.in, usr/bin/byobu-
    layout => usr/bin/byobu-layout.in, usr/bin/byobu-prompt =>
    usr/bin/byobu-prompt.in, usr/bin/byobu-quiet => usr/bin/byobu-
    quiet.in, usr/bin/byobu-reconnect-sockets => usr/bin/byobu-
    reconnect-sockets.in, usr/bin/byobu-select-backend => usr/bin/byobu-
    select-backend.in, usr/bin/byobu-select-profile => usr/bin/byobu-
    select-profile.in, usr/bin/byobu-select-session => usr/bin/byobu-
    select-session.in, usr/bin/byobu-shell => usr/bin/byobu-shell.in,
    usr/bin/byobu-silent => usr/bin/byobu-silent.in, usr/bin/byobu-
    status-detail => usr/bin/byobu-status-detail.in, usr/bin/byobu-
    status => usr/bin/byobu-status.in, usr/bin/byobu-ugraph =>
    usr/bin/byobu-ugraph.in, usr/bin/byobu-ulevel => usr/bin/byobu-
    ulevel.in, usr/bin/byobu => usr/bin/byobu.in,
    usr/lib/byobu/include/config.py =>
    usr/lib/byobu/include/config.py.in, usr/lib/byobu/include/dirs =>
    usr/lib/byobu/include/dirs.in, usr/lib/byobu/include/toggle-utf8 =>
    usr/lib/byobu/include/toggle-utf8.in, usr/share/byobu/tests/byobu-
    time-notifications => usr/share/byobu/tests/byobu-time-
    notifications.in:
    - use @prefix@ rather than hardcoding /usr, makes code
      more portable and easier to build with ./config --prefix

  [ Arminius Silvanus ]
  * usr/share/byobu/profiles/bashrc: LP: #1280550
    - te...

Read more...

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.