0

I don't know how I've exactly managed to do this, but when I now invoke some commands (like man man or less) I see strange ESC[1 characters on the screen. It looks like this:

enter image description here

The interesting part is that other commands (like more) display the console text properly. What could be the case of this behavior and how can I fix it?

Note: I could probably fix this by rebooting, but I'm in a chrooted environment installing the OS and I'd rather like to avoid any restarts. Also, I'm just curious, what happened.

4
  • 1
    Does running reset help?
    – new123456
    May 8, 2012 at 21:18
  • @new123456 unfortunately no
    – colemik
    May 8, 2012 at 21:20
  • 1
    Do you happen to be using a shell that is not color compatible? Those ESC[ characters look to me like ANSI color codes.
    – new123456
    May 8, 2012 at 21:25
  • 1
    Does unset LESS help, maybe? May 8, 2012 at 23:19

2 Answers 2

1

Perhaps your TERM setting is wrong.

Character sequences like "ESC [ 1 m" are ANSI sequences that cause the terminal/console to display text in bold or various colours.

Programs like man use your TERM setting to translate the manual pages from their source format (troff I think) into something your terminal/console can display.

0

It was the LESS environment variable that got reset.

Before applying the fix, there was no LESS env variable at all.

After applying the fix, (running env-update and source /etc/profile), the LESS value is "-R -M --shift 5"

-R --raw-control-chars - output "raw" control characters.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .