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

tmux resurrect not resurrecting latest; seems to be resurrecting *current* session #91

Closed
jzacsh opened this issue Jul 18, 2015 · 3 comments

Comments

@jzacsh
Copy link

jzacsh commented Jul 18, 2015

C-r (resurrect) gives me "tmux-restore" message as usual, but when it completes, it doesn't seem to have done anything. That is: I can open any configuration of windows with random names like "foo" "bar" and "baz" and C-r completes with a success message, but everything is intact.

debug info

see my ~/.tmux.conf and ~/.tmux/resurrect/last -> tmux_resurrect_2015-07-17T19:57:39.txt contents here: https://gist.github.com/jzacsh/45c83999e984cfa64694

tried to gather as much detail as I thought would be helpful here at aciinema.org: asciinema termal recording thumbnail
(note: tmux without the -L main option doesn't resolve my issue)

what I tried

I followed some debugging from issue #29, but didn't see anything that helped me fix this issue

Anyway, any thoughts on what I might try to debug this? I poked around the restore.sh logic, and some simple things look correct (ie: I manually ran a handful of restore-related calls to tmux show-option -gvq calls, but output looks normal to me)

@bruno-
Copy link
Member

bruno- commented Jul 20, 2015

Hey,
thanks for the detailed data (file contents and an ascii vid in the report)!

I think initialization from the tmux.conf might be clashing with tmux-resurrect. Here's what I *think* is happening:

  1. when tmux is started, a couple windows are created from tmux.conf (lines linked above)
  2. a second or so after tmux is started, tmux-continuum auto-restore kicks in and starts restoring
  3. resurrect is idempotent link to readme section meaning it won't try restoring or manipulating windows / panes that already exist. Since a couple windows were created in step 1. those windows won't be overridden in any way.

Could it be the above is the reason for this issue?
For the sake of debugging I recommend commenting out these lines from tmux.conf and try doing a restore and see what happens.

@bruno-
Copy link
Member

bruno- commented Jul 20, 2015

Also, looking at your last file, you have a few non-standard processes that won't be restored by default. More info about which processes are restored by default and other config can be found here.

Basically you can:

  • put this line in tmux.conf to restore *all* programs that are running inside tmux:

    set -g @resurrect-processes ':all:'
    
  • OR explicitly enable each process that should be restored (recommended). Looking at your tmux.conf that would look something like this:

    set -g @resurrect-processes 'ncmpcpp "~ grc tail" ~java'
    

@jzacsh
Copy link
Author

jzacsh commented Aug 9, 2015

Yes, now that I've re-read your explanations (and readme's) I see I had just brushed over some important points previously - this is totally my fault/misunderstanding. Thank you for clarifying.

Everything is working perfectly now! (and my tmux.conf is a tiny bit healthier for it :P )

Thanks again for the quick response, bruno, much appreciated!

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

2 participants