256 Color Issue when using GNU Screen inside GNU Screen

gnu-screenvim

When I have a SSH session in GNU Screen to another machine on which I'm also using GNU Screen, 256 colors don't seem to work. The $TERM is still set correctly. However, if I run Vim, the theme does not look correct as it would with only one screen session.

Local machine: 256 colors in VIM okay
    Screen session: 256 colors in VIM okay
        SSH to remote machine: 256 colors in VIM okay
            Screen session on remote machine: 256 colors in VIM _not_ okay

Best Answer

This is probably a bug in screen. It has some known funkiness with recursive sessions. Unfortunately the project is pretty stagnant (last version released 3 years ago) and bug fixes and features aren't getting added.

Try tmux instead. It does basically the same thing but has a lot of the problematic bits from screen smoothed out and is actively maintained and developed.