15

I am trying to enable the mouse scrolling functionality in my local (non-ssh) byobu installation.

What I have tried doing :

  1. Pressing F7 and scrolling with the mouse results in the following Incorrect scrolling

  2. Enabled the "Save lines to scrollback option" in Iterm2 Save lines to scrollback option

  3. Changed my ~/.tmux.conf to

    set -ga terminal-overrides 'xterm*:smcup@:rmcup@'
    set-option -g mouse on
    

Nothing seems to enable mouse scrolling. I have read pretty much all information on StackOverflow & Google to no avail.

yarco
  • 172
  • 7
  • Hi! Have you found a solution to this, yarco? – Martin Janeček Jun 07 '17 at 11:44
  • After pressing Fn+F7, I use the arrow keys for the scrolling (Fn+Arrow key for scroll pages). It does not work with the mouse, though. But at least I can scroll. – Manuel Jul 21 '17 at 06:55
  • Same here - only arrow keys work for scrolling. Still waiting for a working solution from someone... – yarco Jul 23 '17 at 18:35
  • 2
    It does work for me with Build 3.2.0. It's not perfect but usable. Checking "Save lines to scrollback when an app status bar is present" made it work. – binaryanomaly Aug 13 '18 at 14:07
  • Sadly that did nothing for me...just tried on 3.2.0 and un-re-checked the "Save lines.." config and nothing ... strange. Thanks for the tip thought! – yarco Sep 07 '18 at 03:38

1 Answers1

9

You're modifying the incorrect tmux config for byobu.

Add the following line to the file ~/.byobu/.tmux.conf

set-option -g mouse on

Press F5 to reload your byobu profile (or start a new session). With iTerm 2 "Report mouse wheel events" enabled (the default), you should be able to mouse scroll your byobu sessions.

Druska
  • 4,752
  • 2
  • 30
  • 34
  • Incidentally, byobu documentation claims that `alt+F12` should enable mouse events. It doesn't work cleanly if the installed tmux is recent. If you hit `alt+F12` on Fedora 35 for example, you initially get an error message about an invalid option, which I think is because byobu is sending tmux an old-style mouse command. If you hit it a couple more times, it does correctly toggle mouse mode. At some point, tmux must have changed its mouse related commands, and I'm not sure whether the peculiar behavior in byobu is there as a way to work on both old and new tmux, or if it's a bug? – garrett mitchener Jan 24 '22 at 17:15