12

I have a fresh debian jessie server installed in a virtual machine and I want to be able to scroll back with Shift+PageUp and see the full long output of commands like "apt search browser". At the moment I can only see about 5 pages worth of scrolling.

I tryied the following to increase the scrollback buffer size:

UPDATE: I found out that I have no framebuffer enabled (there is not /dev/fb0 available) ... now I try to figure out how to enable it

1
  • @switch87 what do you mean with updates? I have a fresh system and I am trying to increase the buffer so I can scroll longer upwards by pressing Shift+PageUp several times
    – dasj19
    Commented Feb 18, 2017 at 22:56

2 Answers 2

5

As it turns out I did not have any framebuffer active on my machine (there was no device under /dev/fb0), so I tryied to mount a driver for a framebuffer.

I got a working framebuffer installing the v86d emulator (which is required by uvesafb framebuffer driver) then enabling the uvesafb driver with modprobe uvesafb.

At this point when I had a framebuffer at /dev/fb0 I noticed that the scrollback range increased.

In order to have changes permanent at boot time I did the following:

  • created a new configuration file under /etc/modules-load.d/uvesafb.conf containing the string uvesafb. This module will be loaded at boot time from now on.

  • edited the grub configuration file located at /etc/default/grub and added fbcon=scrollback:1024k to the GRUB_CMDLINE_LINUX_DEFAULT option then a update-grub. Later I noticed that a 1024KB scrollback buffer was not enough for my needs and I increased it to 4096KB.

2
  • Hi there, sorry to bother you, would you mind dumbing down/precising what is needed to do, for less experienced users ? I'm on an ArchLinux bare install in a VM and would like to have a bigger scrollback like you. I tried to follow your answer and install a package called v86d but the package manager doesn't know it. In any case, I'm still a bit lost as to what to do then, even if I was able to install it.
    – Atralb
    Commented Jun 20, 2020 at 5:35
  • hi @Atralb , I spawned an arch virtual machine and things are much more easier than the way I did it on debian. You need to do only the last part with grub editing. Which in Arch is like this: nano /etc/default/grub edit like I describe above, then grub.mkconfig -o /boot/grub/grub.cfg. Use 4096k to have a really long scrollback, default is only 32k according to Arch Wiki. wiki.archlinux.org/index.php/Linux_console
    – dasj19
    Commented Jun 22, 2020 at 14:59
2

Many command-line programs write to standard output, which means you can do something like this to log the output:

apt search browser >> ~/my-log.log

But, a more transparent approach is to use the logging capabilities of a terminal multiplexor.

For example, with tmux you can do the following:

  1. From a terminal run tmux, which will produce a new shell within the utility.
  2. Assuming tmux default keyboard bindings, press CTRL-b, then SHIFT: (hold SHIFT and press colon). That will put you in tmux's command mode.
  3. Type pipe-pane -o 'cat >> ~/my-log.log' and press ENTER.
  4. Run whatever commands you want within that tmux pane; they'll get logged to ~/my-log.log.
2
  • thanks for this workaround, I could also use the less command but I am not looking for a workaround, I want to be able to scroll through the output
    – dasj19
    Commented Feb 19, 2017 at 9:28
  • With tmux you can adjust the size of a pane's buffer, allowing you to scroll back. This is separate from the logging I mentioned. See stackoverflow.com/questions/18760281/… Commented Feb 19, 2017 at 16:30

You must log in to answer this question.

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