tmux-resurrect
tmux-resurrect copied to clipboard
Restoring and Multiple Servers
Hi,
I have a use case where I need two tmux servers. I would start the second server by tmux -L CentOs7 new -s myjob
. The issue I'm having is that the second server tries to restore the first server's session which is NOT what I want. Is there a way to have multiple servers with their separate save/restore?
Hi,
this plugin does not have the awareness of socket name (CentOs7
in tmux -L CentOs7
). When you perform restore it just restores the last saved session from any tmux server.
hi, I am also interested in this feature!
digging around, it looks like modifying resurrect_file_path to append the socket path (tmux display-message -p -F "#{socket_path}"
) could bring us 80% of the way there
is this the right direction?
I suppose you'd also need multple last
links, one for each socket ?
@samm81 I’m not sure multiple last
links are required—if we simply use current socket as part of resurrect_dir
(filename may be enough, since all sockets are in the same directory: basename $(tmux display-message -p -F "#{socket_path}")
), that should cover everything? I might try it.
Done in https://github.com/tmux-plugins/tmux-resurrect/pull/481, seems to work according to local testing on my machine.