Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.
Notice: I'm taking a break from blogging to focus on Atari Gamer . com, check it out!

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
I've recently had an odd experience when using Bash. When I used the mouse wheel to scroll up/down the Terminal window (in OSX) all I got was some control characters being printed out. It looked similar to this...

At the time I was sudo'ed as another user so I exited that shell and tried the mouse wheel again only to have it scroll through the Bash command history instead.

After a bit of reading around this turns out to be related to something called 'cursor addressing' mode that programs like vi and less use. Usually this is turned off after you exit the program, unless something going wrong. There is a way to turn it back off by doing this:
tput rmcup

After running the above command I was able to scroll with the the mouse wheel again!

This most likely happened to me due to a VPN disconnection while being logged in on the remote server and having less open. No matter the cause the above fixes it.


Skip down to comments...
A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. If you spot something out of place, please do let me know.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...