0

If someone ever booted up a GNOME desktop and accessed the terminal you would be quick to realize that the scroll wheel is able to move back and forth through command history. To me this is an ideal feature for a terminal especially for those long code outputs with a find command. However minimal installs do not come with this feature so its up to someone to fill in the gaps from scratch.

In order for someone to see command output history in the terminal, one would have to supply keyboard commands pg up and pg down. This would be fine except one, the computer I use does not have those keys and two, the OS is a virtual machine (virtual box if you will). Hence I would rather have it a part of the mouse's scroll wheel which is where the issue begins.

Documentation is extremely scarce on this process, and the only thing close to the mouse in bare terminals is gpm. The goal I want to achieve is to be able to use my scroll wheel to move through command history. The methods can be anything, but from what I've seen, you would either have to know something I don't or be very clever with the bash.

That being said, one of the earliest methods would be input redirection. Using gpm, it does feed mouse input and movement correctly but it does not include the scroll wheel. This would mean that mouse input is being registered by the gpm service but does not know how to handle it. Perhaps the middle wheel is being registered but it doesn't know what to do with it. If this is the case I would need to know where I can handle that input and if I could link it or pipe it to a less command of the history.

Another idea would be to boot a minimal GNOME install (depending on distribution, and I use centos, it would be yum groupinstall gnome-desktop bare-x or yum groups install "GNOME Desktop".) and to then slowly strip package by package away from the install until you only have the working terminal with the scrolling ability. However this is time consuming and I would probably have to go through 50 virtual machines before I could even achieve that through this method.

Does anyone have anything to contribute to this problem?

2
  • have you tried the up and down arrows? May 26, 2016 at 16:49
  • @JeffPuckettII Its a tty from a minimal install. This does not work unless im using a pipe to less and even then I would still prefer the mouse wheel.
    – Jouster500
    May 26, 2016 at 17:27

0

You must log in to answer this question.

Browse other questions tagged .