tmux-plugins / tmux-continuum

Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
MIT License
3.27k stars 150 forks source link

Automatic tmux start and automatic restore not working in OSX #19

Open chamoda opened 8 years ago

chamoda commented 8 years ago

Automatic tmux start and automatic restore does not work in OSX

Here's the .tmux.conf

unbind C-b
set-option -g prefix C-a
bind C-a send-prefix

set -g mouse-utf8 on
set -g mouse on

set-option -g default-command "reattach-to-user-namespace -l zsh"

set -g terminal-overrides 'xterm*:smcup@:rmcup@'

set -g default-command "reattach-to-user-namespace -l /bin/zsh"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

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

set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'

tmux 2.1 iTerm2 2.9.20160313 OSX 10.11.4

Automatic saving is working fine.

Leeiio commented 8 years ago

Yes, i meet the same problem

chamoda commented 8 years ago

You can restore if you type prefix + Ctrl-R within 15 min of a tmux session start after restart. That's the workaround I'm using now

Leeiio commented 8 years ago

@chamoda Yes, prefix + ctrl-r can restore but automatic restore not working :(

eduncan911 commented 8 years ago

It's always worked for me. Here's my config on OSX:

https://github.com/eduncan911/dotfiles/blob/master/.tmux.conf

set -g @continuum-save-interval '15'
set -g @continuum-restore 'on'
run-shell ~/.tmux/plugins/tmux-continuum/continuum.tmux

Note that i set the options first below I run the shell command. I found this was the only way to get the plugin to read the settings.

Also note that the auto-save never worked for me. I just have to remember to <prefix>-CTRL-R before rebooting.

Note that this was the case until today, when I updated tmux to latest via Homebrew. Now my tmux crashes with lost server, and it is because of this plugin (i am creating another issue for it).

MareoRaft commented 8 years ago

I have the same issue when I put the options BELOW the run-shell command. I have the lost server issue if I put the options ABOVE the run-shell command.

bruno- commented 7 years ago

Sorry for the late reply everyone.

@chamoda , as for your .tmux.conf file in this post, please ensure this line run '~/.tmux/plugins/tpm/tpm' is the last line in your .tmux.conf.

Everything else looks ok but we might have other bugs tho. My terminal of choice is Terminal.app and this one should work.

bruno- commented 7 years ago

@eduncan911 , I checked your .tmux.conf from this post and it looks ok. Given that you're not using tpm, then yes, you have to run the plugins manually with run-shell ...

bruno- commented 7 years ago

I'm not sure what's causing the lost server error ..

rofrol commented 5 years ago

Maybe related https://github.com/tmux-plugins/tmux-continuum/issues/52#issuecomment-44507