byobu not displaying dircolors properly

Bug #817690 reported by Aaron Lake
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Medium
Dustin Kirkland 

Bug Description

Using Byobu version 3.33-0ubuntu1.1 on Ubuntu Natty I'm having a problem with dircolors being displayed correctly. I'm using the popular Solarized color theme with Putty on Windows and iTerm2 on OS X. Initially I thought there was a configuration problem on my end, however, a bit more digging leads me to believe that byobu handles bold colors differently then a vanilla shell. After I modified my color scheme to set bold colors to be identical to regular colors (Blue Bold == Blue, etc.) the dircolors are now displaying properly.

I believe this is a byobu bug, and not a bug with the Solarized color scheme since the dircolors display properly outside byobu. Using a 256 color terminal my prompt displays properly too.

Commands ran in within byobu:
alake@foxery:~/askubuntu » dircolors -p > ~/.dircolors
alake@foxery:~/askubuntu » echo $TERM >> ~/.dircolors

### Restarted ssh session here

alake@foxery:~/askubuntu » alias ls
ls='ls --color=tty'
alake@foxery:~/askubuntu » echo $TERM && grep $TERM ~/.dircolors
screen-256color-bce
TERM screen-256color-bce
alake@foxery:~/askubuntu » dpkg -la | grep -i byobu
ii byobu 3.33-0ubuntu1.1 a set of useful profiles and a profile-switcher for GNU screen

See the screenshot for a further explanation.

This bug might be related to: https://bugs.launchpad.net/ubuntu/+source/byobu/+bug/800195

Revision history for this message
Aaron Lake (aaron-lake) wrote :
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Howdy!

I suspect that this bug is related to Bug #727466.

Could you try adding:
  attrcolor b ".I"
to your ~/.screenrc and restarting byobu?

And if that doesn't work, try adding:
  attrcolor b ".i"
to your ~/.screenrc and restarting byobu.

And let me know how it goes...

Changed in byobu:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Hannes Koller (hannes-koller) wrote :

Hi, I am having the same problem on my Kubuntu 11.04 install. I tried both settings Dustin suggested, but to no avail. Anything else I could attempt? Would be happy to get rid of this little annoyance. :)

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 817690] Re: byobu not displaying dircolors properly

Hmm, okay, then this must be more widespread than I was thinking.

Two requests:
 1) Can you post a screen shot, so that we can see if the errors look
more or less the same?
 2) Could you try downgrading to some of the Byobu releases at
http://pad.lv/u/byobu? If you find any that work, it would help me
bisect the regression, as I suspect that this hasn't always been a
problem (it's only really coming up a lot recently)

--
:-Dustin

Revision history for this message
Hannes Koller (hannes-koller) wrote :

I have attached a screenshot that shows the difference. This was taken with byobu Version: 3.33-0ubuntu1 . Following your suggestion I tried to manually install different versions of byobu. Installing Version: 3.5-0ubuntu1 fixed the problem for me.
Thanks for your support!

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Awesome feedback, Hannes. I'll get this solved ;-)

Changed in byobu:
status: Incomplete → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hannes, can you take a look at my Comment #2 and get me some feedback on making that change?

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hannes, one more request, could you try the latest byobu version from Oneiric? You can safely just download and install the Oneiric deb from:
 * https://launchpad.net/ubuntu/+source/byobu

Changed in byobu:
status: In Progress → Incomplete
Revision history for this message
Blair Bethwaite (blair-bethwaite) wrote :

Had similar problems on CentOS5, with both Byobu-4.1/4.29. I tracked the issue down to the shell environment aliases for ls, normally "ls --color=tty" on this OS, not being set inside Byobu sessions.

This appears to be due to the behaviour of the /etc/profile.d/colorls scripts and the fact that Byobu sets defbce in its Screen config, this results in TERM=screen-bce which is itself not listed in /etc/DIR_COLORS, and so the alias is never set. Commenting out the defbce setting in share/byobu/profiles/common fixes it without any side effects that I have noticed.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

To anyone having this problem...

Could you try the suggestions in Comment #9?

First, try "ls --color=tty" and see if you get the colors you want.

Second, try commending out "defbce on" in your ~/.byobu/profile.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Shouldn't it be fixed with byobu 3.5-0ubuntu1 (comment #5)?

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Daniel, well, he downgraded from 3.33 to 3.5.

Revision history for this message
Hannes Koller (hannes-koller) wrote :

Hi,

interestingly commenting out the dbfce setting does NOT fix byobu for me (tested on Ubuntu 11.04 and Ubuntu 10.04).

BUT I recently found a very similar fix that works for me:

Edit /usr/share/byobu/profiles/common

comment out:
# attrcolor b ".I"
# termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

restart byobu.

Hope this helps :)

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks, Hannes!

Changed in byobu:
status: Incomplete → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hannes,

Could you try, instead, adding this to your ~/.screenrc:

attrcolor b ""
termcapinfo xterm* ti@:te@

Changed in byobu:
status: Triaged → Incomplete
Revision history for this message
Hannes Koller (hannes-koller) wrote :

Dustin,
sorry for the late reply. I just tried your suggestion on Ubuntu 10.04 (byobu version 2.68-0ubuntu1.2 ) and it did not fix the problem (but commenting out the two lines from /etc/share/byobu/profiles/common does fix it)... will try on newer version when I find the time..

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Found some info here:
 * http://aperiodic.net/screen/commands:termcapinfo

Bookmarking it for looking deeper later.

Revision history for this message
Rami Al-Ghanmi (alghanmi) wrote :

I did not notice much of a difference in directory listings, however, there is a significant different when using vim. In the attached screenshot, you see two instances of the same vim configuration. One of them using byobu and the other one is not.

I attempted the fixes in #2, #13, #15 with no success. I am running:
* Ubuntu 10.04.4 LTS
* byobu 5.17
* tmux 1.5
* vim 7.2 (including patches 1-330)

For reference, this is the Solarized vim repo:
* https://github.com/altercation/vim-colors-solarized

Revision history for this message
Rami Al-Ghanmi (alghanmi) wrote :

I was able to fix this by adding the following line to my .bashrc

export TERM="xterm-256color"

Changed in byobu:
status: Incomplete → Fix Committed
Changed in byobu:
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.