Skip to content

Instantly share code, notes, and snippets.

@ijin82
Created August 27, 2021 23:43
Show Gist options
  • Save ijin82/6ac079678b84a9af2046ecd601ec6f6e to your computer and use it in GitHub Desktop.
Save ijin82/6ac079678b84a9af2046ecd601ec6f6e to your computer and use it in GitHub Desktop.
FIX .screenrc broken colors in xterm-256color

Fix broken colors in screen (screen-256color $TERM)

Original solution

https://bbs.archlinux.org/viewtopic.php?id=67464

Fix

# use "term xterm-256color" in .screenrc
> infocmp -L xterm-256color > temp.terminfo
> vim temp.terminfo
# remove "back_color_erase," from second or third line
> install -d .terminfo
> tic -o .terminfo/ temp.terminfo
> sudo mv /usr/share/terminfo/x/xterm-256color ./terminfo.backup
> sudo mv .terminfo/x/xterm-256color /usr/share/terminfo/x/xterm-256color
> ?
> profit

a few things to note. i guess after you do tic -o .terminfo/ term.terminfo your system will go to ~/.terminfo before /usr/share/terminfo anyway so you should be done for your user. after the day i've had with this issue i just wanted to install it globally to be sure it was having an effect, thus the extra steps.

seems to be working fine so far, i'm afraid when i get home and try it in a transparent terminal it'll do something goofy on me... oh well, we'll see.

/edit: typo in the code block, s/term.terminfo/temp.terminfo/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment