It could be many things.
Please provide the output of:
echo $TERM
echo $LS_COLORS
typeset -p LS_COLORS
alias ls
tput setaf 1 | od -c
echo "$(tput setaf 1)red$(tput sgr0)"
Expected results:
xterm (optional, see below)
no=00:... (or similar, should not be empty)
declare -x LS_COLORS="no=00:..." (ditto)
alias ls='ls --color=auto' (or similar)
0000000 033 [ 3 1 m
0000005
red (in red)
My guess: TERM
is set to something unusual, and dircolors doesn't know about it, therefore ls
doesn't know what colors to use.
If this is the case, running the above commands inside your byobu/screen session, you would see:
screen (or screen-something)
(nothing)
(nothing)
0000000 033 [ 3 1 m
0000005
red (in red)
Confirm that this is the case by running:
dircolors -p | grep "^TERM $TERM$"
I would expect it to print nothing.
The simplest fix, depending on your configuration, would be:
dircolors -p > ~/.dircolors
echo "TERM $TERM" >> ~/.dircolors
Screen has its own scroll buffer, as it is a terminal multiplexer and has to deal with several buffers.
Maybe there's a better way, but I'm used to scrolling using the "copy mode" (which you can use to copy text using screen itself, although that requires the paste command too):
Hit your screen prefix combination (C-a
/ control+A by default), then hit Escape.
Move up/down with the arrow keys (↑ and ↓).
When you're done, hit q or Escape to get back to the end of the scroll buffer.
(If instead of q or Escape you hit Enter or Return and then move the cursor, you will be selecting text to copy, and hitting Enter or Return a second time will copy it. Then you can paste with C-a
followed by ]
.)
Of course, you can always use more
and less
, two commonly used pagers, which may be enough for some commands.
Best Answer
By default Screen will keep a scrollback buffer, but you can't use it the same way as the "conventional" scrollback buffer maintained by your terminal emulator. I.e. you can't use your mouse to scroll up.
You need use screen key bindings to enable copy/scrollback mode.
For me that is with CTRL+a ESC
(screen will notify that copy mode has been enabled)
and then I can use the UP-arrow on my keyboard to scroll back, but you can also use the other movement keybindings to move and select in the scrollback buffer.