7

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

  • @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 Feb 18 '17 at 22:56
3

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.

1

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.
  • 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 Feb 19 '17 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/… – Emmanuel Rosa Feb 19 '17 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.