# Ubuntu – Retaining bash prompt colors when starting a screen session

10.04command linegnu-screenssh

When I ssh into a Ubuntu Lucid box the prompt is all pretty, with colors. Everything is the default, as far as I know. Here's my $PS1 outside screen: $\e]0;\u@\h: \w\a$${debian_chroot:+($debian_chroot)}$\033[01;32m$\u@dev$\033[00m$:$\033[01;34m$\w$\033[00m$\$


But then once I start screen up the colors go away. Everything else is fine, and my screen can support colors (notice that the . and .. in this ls -al are blue) but the prompt isn't. In theory everything should be exactly the same. $PS1 inside screen: ${debian_chroot:+($debian_chroot)}\u@dev:\w\$


EDIT: This is just plain vanilla screen.

You can edit the following line in your .bashrc (it's #39 in my .bashrc):

#force_color_prompt=yes


Change to:

force_color_prompt=yes


This could possibly be annoying if you log in from somewhere where color is not supported, but i find it highly unlikely.