OpenBSD Journal

Persist tmux environment across system restarts

Contributed by jj on from the frankensteins terminal dept.

Nagy Gábor writes in with a tip:
Tmux is great, except when you have to restart the computer. You lose all the running programs, working directories, pane layouts etc. There are helpful management tools out there, but they require initial configuration and continuous updates as your workflow evolves or you start new projects.
tmux-resurrect saves all the little details from your tmux environment so it can be completely restored after a system restart (or when you feel like it).
No configuration is required, you should feel like you never quit tmux. It even (optionally) restores vim sessions!
Here's what's been taken care of:
  • all sessions, windows, panes and their order
  • current working directory for each pane
  • exact pane layouts within windows
  • active and alternative session
  • active and alternative window for each session
  • windows with focus
  • active pane for each window
  • programs running within a pane!
  • restoring vim sessions (optional).

(Comments are closed)


Comments
  1. By Martin Tournoij (2a02:22a0:aaaa:13:5e51:4fff:fe7c:dc83) martin@arp242.net on

    Nice idea.

    One (possible bug?) I discovered is that it doesn't seem to set the terminal titles; If I type, for example, 'top' the terminal title at the bottom changes to 'top', If I restore it, it always stays at 'tcsh', no matter what I do...

    I think this may be a side-effect of this script setting the terminal title? The "automatic" title is then lost (like when you use 'prefix ,')...

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]