byobu color prompt doesn't work correctly

Bug #1268072 reported by Abhirav Kushwaha on 2014-01-11
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Dustin Kirkland 
byobu (Ubuntu)
Dustin Kirkland 

Bug Description

Normal bash prompt has 1 charater space between prompt text '$' and caret position but byobu prompt by default has 3 character space between '>>' and the caret position where I can input text.

Pressing tab 2 times (for command completion) makes the width between '>>' and text as 1 character apart but caret position is 2 space apart from the text. Now deletiong the text using 'delete' key leave 2 charater on the screen, they could not be deleted at all.

I'll expain this behaviour using an example ( _ indicate caret position),

default space between '>>' and input text is 3 charaters.
abhiravk@abhirav-linux:~⟫ byobu_
(pressing tab key 2 times)

abhiravk@abhirav-linux:~⟫ byobu _
(pressing delete 5 times)

abhiravk@abhirav-linux:~⟫ by_
(these last 2 characters can't be deleted)

(new input text doesn't include those 2 leftover charaters but text looks like as follows)
abhiravk@abhirav-linux:~⟫ byuname -a
Linux abhirav-linux 3.8.0-35-generic #50~precise1-Ubuntu SMP Wed Dec 4 17:28:45 UTC 2013 i686 i686 i386 GNU/Linux

I am using ubuntu 12.04.3, byobu 5.68, tmux 1.6, gnome terminal .
Screenshot is attached.

Related branches

Abhirav Kushwaha (abhiravk) wrote :
Dustin Kirkland  (kirkland) wrote :

Wow, I've really never seen that behavior. I'm marking this High priority, but Incomplete, until I can reproduce this problem.

I see you're in a pretty stock setup (gnome-terminal, Ubuntu 12.04).

Can you reproduce this with the latest Byobu in the PPA?

Changed in byobu:
importance: Undecided → High
status: New → Incomplete
Abhirav Kushwaha (abhiravk) wrote :

I could reproduce it on Ubuntu 13.10 and byobu 5.73 as well.
I would be glad to help you, in case you need any specific information.

abhiravk@abhirav-linux:~⟫ uname -a
Linux abhirav-linux 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:53:31 UTC 2014 i686 i686 i686 GNU/Linux
abhiravk@abhirav-linux:~⟫ cat /etc/issue
Ubuntu 13.10 \n \l

abhiravk@abhirav-linux:~⟫ byobu -v
byobu version 5.73
tmux 1.8
abhiravk@abhirav-linux:~⟫ byobu
byobu byobu-enable byobu-launch byobu-prompt byobu-select-backend byobu-status
byobu-config byobu-enable-prompt byobu-launcher byobu_prompt_status byobu-select-profile byobu-status-detail
byobu-ctrl-a byobu-export byobu-launcher-install byobu-quiet byobu-select-session byobu-tmux
byobu-disable byobu-janitor byobu-launcher-uninstall byobu-reconnect-sockets byobu-shell byobu-ugraph
byobu-disable-prompt byobu-keybindings byobu-layout byobu-screen byobu-silent byobu-ulevel
abhiravk@abhirav-linux:~⟫ byls
datadisk Desktop downloads dwhelper fontconfig Music Public root-fs-x86 Templates VirtualBox VMs
deploy Documents Downloads examples.desktop jd2 Pictures PycharmProjects scripts Videos workspace

I have the same problem too. Pressing double-tab screws things up, and the characters displayed on screen are not the same as what the terminal thinks they are. For example, pressing two tabs transfers the two extra spaces from before the command to after the command, visually. But internally, nothing has changed. So by looking at things visually, one feels like deleting the last two extra spaces, but what gets deleted are the last two characters one had actually typed.

Below, I will use _ to indicate a space and | to indicate the caret position. I describe what I *see*, not what the terminal believes is happening. When I open a terminal, I see this:


I type something:


I press tab a few times:


I wonder why the two extra spaces, so I backspace twice and continue typing the command


I get an error saying that the command "echtest" wasn't found. This means that when I pressed backspace twice, internally the space after the 'o' and the 'o' got deleted. This is sort of expected, because these two were the last two characters I had typed before backspacing.

This makes the default byobu prompt unusable. If I change the ⟫ character to >, the behaviour is normal. I'm using Konsole on Kubuntu 13.10. The character encoding in Konsole is set to UTF-8.

Dustin Kirkland  (kirkland) wrote :

Adding the Ubuntu package to this bug, since your screenshots and info here clearly show you're running Ubuntu.

I still haven't managed to reproduce this problem.

I suspect that there might be something funny in your ~/.profile or ~/.bashrc? Could you back those up, and then install the stock ones from Ubuntu? Just copy over /etc/profile and /etc/bash.bashrc over those files, and start byobu fresh.

Changed in byobu (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Abhirav Kushwaha (abhiravk) wrote :

Issue is same even after replacing .bashrc and .profile file from /etc/bash.bashrc and /etc/profile .

Launchpad Janitor (janitor) wrote :

[Expired for byobu (Ubuntu) because there has been no activity for 60 days.]

Changed in byobu (Ubuntu):
status: Incomplete → Expired
Kashyap Kopparam (kashyapk) wrote :

I could reproduce this problem with ubuntu 14.04 cloud image. This is one annoying bug.

Changed in byobu (Ubuntu):
status: Expired → Confirmed
Changed in byobu:
status: Incomplete → Confirmed
Abhirav Kushwaha (abhiravk) wrote :

This problem goes away if I replace the UTF-8 character in the prompt to an ASCII character e.g. '>'.

BTW, this problem exist in the latest ubuntu as well (using zsh).
λ ~ → cat /etc/issue
Ubuntu 15.04 \n \l

λ ~ → byobu -v
byobu version 5.92
tmux 1.9
λ ~ →

Abhirav Kushwaha (abhiravk) wrote :

This issue is related to 'tmux'.

We need to start tmux with Unicode support, either by
tmux -u
or setting the LC_ALL variable in the shell environment from which tmux would be started,

Dustin Kirkland  (kirkland) wrote :

bzr commit -m '* usr/bin/
  - ensure we start tmux with unicode support, LP: #1268072' --fixes 'lp:1268072'
Committing to: /local/media/src/byobu/byobu/
modified debian/changelog
modified usr/bin/
Committed revision 2420.

Changed in byobu:
status: Confirmed → In Progress
Changed in byobu (Ubuntu):
status: Confirmed → In Progress
Changed in byobu:
assignee: nobody → Dustin Kirkland  (kirkland)
Changed in byobu (Ubuntu):
assignee: nobody → Dustin Kirkland  (kirkland)
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu):
status: In Progress → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers