tmux-continuum
tmux-continuum copied to clipboard
Tmux resurrect file not found!
I get this error when running tmux.
Running on OSX Sierra 10.12.2 Tmux 2.3
Here is my tmux.conf file:
# TMUX Ressurect plugin
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-save-interval '5'
set -g @continuum-restore 'on'
run '~/.tmux/plugins/tpm/tpm'
The resurrect directory did exist but looks like it was caused by the lack of saved session in the directory. This had me confused for the entire time and thought I installed the plugin incorrectly so after further reinstalls I finally got it. For newbs like me I think it would probably help if the error would be more specific.
I had same error, after trying to save session. chmod 755 ~/.tmux fixed it. Problem was that it was never saving the session because of permission issues.
Yeah.... and this is obvious, but make sure you've actually saved a session (prefix + ctrl-s) before trying to restore (prefix + ctrl-r). :man_facepalming:
I had a same issue. Resolved the issue by
- ls -lah ~/.tmux/tmux-resurrect/last
- cd ~/ && ls -lah .
if your tmux folder is owned by "root", not username like this
drwxr-xr-x 3 root root 4.0K Jul 21 17:33 .tmux/
Make sure to change the ownership by
sudo chown $(whoami):$(whoami) -R .tmux
My stupidity of using root privilege whilst installing resurrect caused this issue....
This error occurred for me when the symbolic link last was pointing to a non-existent resurrect file. I'm guessing I quit tmux while tmux-resurrect was saving.
To solve I created a new link pointing to the last created save:
ln -sf tmux_resurrect_2017-09-08T09:53:43.txt last
If you try to save it from a vagrant machine into the host via shared folder it wont work because of the permissions as @omenius said :'/
UPDATE 20180627: To follow up with what user errors were causing my issue... I regularly transition between a VM and laptop, which means I'm always pushing and pulling changes from my repos. In the case of tmux-resurrect, I tried simplifying my dotfile management by using $ git add -u, which as I know now, will NOT bring in any newly created files, only update those that were already part of the repo. This caused the last file to point to a .txt file reference that, after pulling down from git, did not exist in the pull. Going back to manually adding things through $ git add .tmux-resurrect and things are now smooth sailing again :)
Thank you @tim-phillips, your solution is what did the trick on my end!
This happened to me just after restarting my computer using the "reboot" command line. I suppose it somehow caught the resurrect plugin in the middle of saving the session and it never got the chance to create the "last" symbolic link before the shutdown. Thank you @tim-phillips for the tip.
I wrote a shell function to help dealing with this:
function tmux-resurrect-reset-last() {
cd ~/.tmux/resurrect && \
ln -f -s $(/bin/ls -t tmux_resurrect_*.txt | head -n 1) last && \
/bin/ls -l last
}
This issue no longer happens on latest updates.
Still happening for me, latest version. I regularly come to this issue and try a couple of the solutions but never manage to find out which one actually does the trick.
Yeah.... and this is obvious, but make sure you've actually saved a session (
prefix+ ctrl-s) before trying to restore (prefix+ ctrl-r). man_facepalming
These is the solution!
Happened to me on a Mac today after rebooting. After a lot testing, I finally decided to change the following in my ~/.tmux.conf.local file
- From
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-dir '$HOME/.tmux_resurrect'
To hardcoding the path
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-dir '/Users/myuserid/.tmux_resurrect'
No idea why using $HOME stopped working as I didn't change anything and I've used that in resurrect-dir for years. I use $HOME since I clone my dotfiles across many Linux and Mac systems, and the home directory / userid vary depending on the system.
No idea why using
$HOMEstopped working as I didn't change anything and I've used that inresurrect-dirfor years. I use$HOMEsince I clone my dotfiles across many Linux and Mac systems, and the home directory / userid vary depending on the system.
Had the same problem. Tried to use ~ instead of $HOME, successfully.