Keep Session with Terminator

17

7

I am using Terminator for multiple Terminal Sessions. I know I can start with custom Session layout but most of the time I have changing Session settings.

Is it possible to save the current Session with terminator? For example if I shutdown the PC and then restore my old session on next start-up.

Denny Mueller

Posted 2013-06-28T14:45:57.103

Reputation: 279

Answers

1

You Can use tmux for this.


If you are a mac user, to install it you need to already have homebrew(a package manager for macOS)

home brew can be istalled by executing:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After that simply install tmux by:

brew install tmux

If you are a linux user you may skip the above part and execute:

For Debian / Ubuntu based: sudo apt-get install tmux

For RedHat / CentOS based # yum install tmux


There are two plugins: tmux-resurrect and tmux-continuum. tmux-resurrect enables saving and restoring tmux sessions manually, while tmux-continuum saves automatically and allows for automatically restoring from the last save when tmux is started. To enable these settings, add the following to your ~/.tmux.conf:

set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'

With this configuration, there’s no need to do anything manually. Your tmux sessions will be automatically saved every 15 minutes and automatically restored when tmux is started (even after a reboot). You can manually save with prefix-Ctrl-s and manually restore with prefix-Ctrl-r if desired.

Note that this won’t restore running applications. tmux-resurrect has an optional configuration for doing so.

edit: i just saw that you asked this question 5 years ago. Sorry for the delay.

helper

Posted 2013-06-28T14:45:57.103

Reputation: 201

although i agree that your solution is a way to solve it, it's not what the OP asked for - i've moved to moving terminal multiplexing exactly for the same reason as OP, because I couldn't figure it out back then as well.

also: thanks for the mention of tmux-continuum - i'm currently using ressurect! – mhr – 2019-08-09T10:09:46.777