65

I have bash installed on my W10 laptop, but one thing that is very frustrating is I can not scroll up.

Does anyone know of a way to enable scrolling with the mouse wheel? I could not find anything after many google searches.

Context: If I compile some C++ files and get a lot of errors, I can not scroll up to see all those errors.

shilovk
  • 7,603
  • 15
  • 54
  • 63
kebab-case
  • 1,399
  • 1
  • 8
  • 17
  • 5
    This question is a "How do I use WSL terminal?" question and belongs on [**Super User**](http://superuser.com/) as it has nothing to do with code. – David C. Rankin Aug 21 '17 at 20:55

5 Answers5

151

You must set PropertiesLayoutScreen Buffer SizeHeight to the number of lines you want.

The default was 50 lines. I set it to 1000 and that's enough for me.

Properties menu

hippietrail
  • 13,703
  • 15
  • 87
  • 133
shilovk
  • 7,603
  • 15
  • 54
  • 63
  • 5
    this worked to display the scrollbar, however scrolling on the mouse still does nothing. I can scroll up by manually dragging the scroll bar up and down, but scroll wheel, pgup/down do not work. Any clues? – Samir Aug 02 '18 at 19:43
  • 3
    Me too, and after following these steps, if I open the properties menu again, it has changed back to 50! EDIT: When I closed and reopened it worked. – Burrito Aug 24 '18 at 13:47
  • 2
    I set the properties as suggested here and then close and reopen WSL and it all returns to defaults. ): – aderchox Jan 04 '19 at 18:22
  • How it solves the mouse scroll problem? – vovchisko Dec 18 '20 at 19:23
12

Right click the window frame, select "properties" from the contextual menu. In Properties, first tab, in the edit option area, tick the "QuickEditMode". That will allow you to mouse scroll.

Screenshot of properties:

brasofilo
  • 23,940
  • 15
  • 86
  • 168
Advised Travel
  • 131
  • 1
  • 2
6

Make sure you're hitting properties, and not defaults. Both menus will appear the same, but only properties will give you the result you're looking for!

KatenGaas
  • 81
  • 2
  • 6
0

I found that this doesn't work when running the current Ubuntu 20.04 LTS image (or 16.04 LTS either, IME). This is because tmux is enabled.

Try enabling tmux's mouse mode:

echo 'set -g mouse on' >> "~/.tmux.conf"

And restart your terminal window (close/open).

See related post: https://superuser.com/questions/209437/how-do-i-scroll-in-tmux

DrUseful
  • 165
  • 1
  • 10
0
  1. Switch to a different Windows application to bring the WSL terminal out of focus (e.g. by pressing AltTab or clicking an empty part of the Windows taskbar)
  2. Hover over the (now out-of-focus) terminal running WSL and scroll using the mouse wheel

And make sure that in the Windows Settings, you have Mouse > "Scroll inactive windows when I hover over them" turned on.


I know this is a bit unsatisfying but it's the only thing that actually works well for me.

  • My screen buffer size was sufficiently large and the scroll bar works fine otherwise. However, the mouse wheel still doesn't start working by increasing the buffer size alone.
  • I'm not interested in QuickEdit mode because it stalls running programs indefinitely if I so much as accidentally click
  • editing my tmux configuration did nothing.
alter igel
  • 5,696
  • 3
  • 16
  • 38