Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Something happened so I don't see less highlights any more. I've tried:

  • using different terminal.
  • using -g option
  • making sure -G isn't there
  • ^K while searching
  • ESC-U

Nothing helps.

I work in Ubuntu 12.10 on an i3 desktop. $TERM=screen-256. When I use ^ ALT 1 to switch to TTY1 and do man man I can see that it highlights there both man parameters and search patterns.

What else can I do to fix it ?

share|improve this question
1  
What did set the TERM variable to that value? Are you using screen? –  Dennis Mar 14 '13 at 20:47
add comment

1 Answer

up vote 1 down vote accepted

The highlighting in TTY1 works since it sets the TERM variable to a proper value.

If you're using screen:

Change the TERM variable to a proper value (e.g., screen or screen-256color). Check your personal ~/.screenrc or the system-wide /etc/screenrc and fix the corresponding line.

In my version of less, the value screen-256 should actually results in an error:

WARNING: terminal is not fully functional
-  (press RETURN)

If you're not using screen:

The screen* only get interpreted correctly by screen.

The correct value for TERM depends on your terminal emulator and should usually get set by it. The default of Ubuntu's three pre-installed terminal emulators is xterm.

Execute

grep -R TERM= ~/.* /etc 2> /dev/null

the check if TERM's value gets overridden in your shell's configuration files.

share|improve this answer
1  
echo $TERM in TTY1 reteruns 'screen-256 color' too. But changing TERM to 'xterm' highlights it again. –  majkinetor Mar 14 '13 at 21:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.