Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two computers with the latest Fedora. On the first, I'm using zsh and the mouse wheel can be used with the less pager within gnome-terminal to scroll the pager.

On the second, I use bash and the mouse whell scroll the terminal history, not the pager.

The shell shouldn't make any difference, why can't I use the mouse wheel to scroll in the second case?

share|improve this question

migrated from Jul 30 '12 at 6:33

This question came from our site for professional and enthusiast programmers.

This site is for programming related questions, try – Let_Me_Be Aug 2 '11 at 7:23
On Guake 0.4.4 (Ubuntu 14.04) there ia a bug that has already been fixed upstream: – Ciro Santilli 巴拿馬文件 六四事件 法轮功 Jan 28 '15 at 14:20
up vote 19 down vote accepted

The computer where less scrolled had LESS=-r, the other had LESS=-asXFMMRqix8

From the less man page:

   -q or --quiet or --silent
          Causes  moderately  "quiet"  operation: the terminal bell is not
          rung if an attempt is made to scroll past the end of the file or
          before the beginning of the file.  If the terminal has a "visual
          bell", it is used instead.  The bell will  be  rung  on  certain
          other  errors, such as typing an invalid character.  The default
          is to ring the terminal bell in all such cases.

   -X or --no-init
          Disables sending the termcap initialization and deinitialization
          strings  to  the  terminal.   This is sometimes desirable if the
          deinitialization string does something unnecessary, like  clear‐
          ing the screen.

The -X option prevented scrolling all together and the -q option caused the pager to enter a non scrollable state when scrolling past the beginning or end of file.

My options are now LESS=-asrRix8

share|improve this answer
Ugh. So disappointing: I love -XE, because I love having small files immediately dumped at the prompt, i.e. using less as a cat replacement for small files. I wish I could have -XE behaviour with scrolling on longer files … e-mailed the author in hopes this is something achievable. I suspect not. >: – ELLIOTTCABLE Jan 26 at 21:59

You must log in to answer this question.

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