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 am trying to get mousewheel scrolling to work in less, within an xterm in cygwin with XMing x-server and fvwm window manager !

I hope I make sense..
I have tried rxvt, urxvt, urxvt-X, aterm, mrxvt without luck !

The only place this works is mintty.. but I won't use a non-X window just to get mouse scrolling in less.

Also, mouse scrolling in vim is working correctly!

Actually, mouse scrolling "works" but it is captured by xterm and not within less (meaning I see the previous commands from the command ilne when I scroll back)

And, last, I have tried a possible solution found online but it didn't work either.
the one where you echo -e '\e[?1000l' to turn on mouse capturing.

Am I missing something here? or it just doesn't work ?

share|improve this question
up vote 0 down vote accepted

The reason this works in mintty is that it translates mousewheel events to arrow up/down keypresses when an application activates the so-called alternate screen but not mouse reporting mode. I think Gnome Terminal and KDE Konsole do this as well, but apparently the ones you tried do not.

In the mouse reporting mode activated with echo -e '\e[?1000l', special control sequences are sent for mouse events, which need to be supported in the application. The likes of vim and emacs do this, but less does not.

share|improve this answer
I see.. So bottom line, I can't do this without a patch for less :) – Stefanos Kalantzis Mar 14 '12 at 8:46
I just found out the cygwin-ports and I added gnome-terminal which supports this! thanks for the info :] – Stefanos Kalantzis Mar 14 '12 at 8:47

This is not supported yet Enhancement 272 is still open (as of release 481). It is planned for future support, but has not been written.

share|improve this answer

You must log in to answer this question.

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