Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restoring the scrollback buffer after a restart; à la Mac's Terminal.app #457

Closed
seamusdemora opened this issue Oct 20, 2022 · 1 comment

Comments

@seamusdemora
Copy link

I've long heard of tmux, but never tried it - I was able to do everything I needed with screen. Also, much of my terminal usage has been done on Macs using Terminal.app and iTerm2. I have a new interest now that compels me to begin using a terminal emulator on Ubuntu - I'm currently using the default Gnome terminal (& evaluatingTerminator).

I've likely incorporated some inefficient terminal usage practices in my workflow - perhaps my reliance on the scrollback buffer is one? But I get interrupted a lot, and I use the scrollback buffer to help me collect my thoughts before resuming a task. "Let's see - where was I?..." Even after a shutdown or restart of my Mac, the entire scrollback buffer in Terminal.app and iTerm2 is restored (as long as the restore open apps at restart option is selected at shutdown).

The Linux terminal emulators I've tried do not restore the scrollback buffer following a restart - unless I have missed something obvious in their configuration (entirely possible)! Perhaps it's my lack of experience, but after some effort, I have come to the tentative conclusion that there are no Linux terminal emulator applications that restore scrollback to the sessions (tabs) following restart - as Terminal.app and iTerm2 do on the Mac.

And that's where the tmux-plugins come in! I read that the tmux-resurrect and/or tmux-continuum plugins have the ability to restore the entire scrollback buffer to a tmux session. However, after reading the docs here, and a couple of experiments using tmux-resurrect, I am now unsure whether or not this is actually possible?? In summary then, my question is:

Will the tmux-plugins allow me to restore the scrollback buffer to a tmux session?

@sturob
Copy link

sturob commented Apr 23, 2023

set -g @resurrect-capture-pane-contents 'on' in your tmux.conf

@bruno- you can close this

@bruno- bruno- closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants