Comments (22)
Hi, thanks for reporting this. I'm sorry this is happening for you, and I can't say what is the cause.
Generally, exit code 127 means "command not found".
Here are a couple things to try:
- when inside tmux just try running
~/.tmux/plugins/tmux-resurrect/resurrect.tmux
in the shell. Do you still get the error? Can you paste the output? - you have
bash
installed on the system right? It was not mentioned as a special dependency because it is so common. tmux
executable is in your$PATH
? Test withwhich tmux
(should display path to tmux).- you have
dirname
program? It is posix and very common so also not mentioned explicitly as a dependency. Test withwhich dirname
. - Just in case, can you please attach the content of your
.tmux.conf
file.
I hope some of that will give us some clue!
from tmux-resurrect.
If anyone else comes across the issue, this is what solved it for me.
Remove
run-shell ~/tmux-resurrect/resurrect.tmux
from ~/.tmux.conf
if installed via Tmux Plugin Manager. The above line is only needed when installing manually without the plugin manager.
from tmux-resurrect.
Hi @Netmage-76,
thanks for the detailed response. I think answers 1) and 2) make it pretty clear: you don't have bash, and it's required.
It doesn't need to be the "default" shell, but it needs to be installed on the system.
I'll add bash
to the list of plugin dependencies.
If you decide to install bash, can you let me know if everything works fine? Thanks
from tmux-resurrect.
@ilteris, your output and .tmux.conf
file - it all looks good.
For the first command: running ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
you wrote you get regular output without errors.
So this: set option: @resurrect-strategy-irb -> default_strategy
is perfectly fine output.
After you manually run ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
in the console
you should have tmux-resurrect
bindings working. Can you try if prefix + Ctrl-s
key binding works after that?
If that works, then I think the problem is somewhere with tpm
(not tmux-resurrect
).
Anyway, let me know the update!
from tmux-resurrect.
Hi @ilteris,
no, thank you for the valuable feedback on this. We're probably fixing this problem for dozens of users out there that never bothered to open an issue.
The Tmux environment saved!
output is good!
I don't know how vim could mess things up here... if you doubt that's the problem why not try prefix + C-s
from the new tmux window where vim is not running (but I doubt vim is the problem).
This is the pattern is see here:
- starting resurrect script: fails when run via tmux, succeeds when run directly
- resurrect save script: fails when run via tmux key binding, succeeds when invoked directly
So it seems when tmux
runs all these scripts something is not working. All the scripts run with bash, and they have the following she-bang #!/usr/bin/env bash
at the top of the files to indicate that.
Maybe tmux has issues with bash? I see you're running zsh
by default.
I'll try recreating your environment tomorrow - switching to zsh and using relevant parts of your .tmux.conf
.
If you get any clue on this by then, please let me know.
from tmux-resurrect.
Not specifically sure what caused this for me, but deleting and reinstalling plugins didn't help. Instead just copied the file to where it wanted to be from Gtihub:
mkdir $HOME/.tmux/plugins/tmux-resurrect/scripts/ &&
curl -fsSL https://raw.githubusercontent.com/tmux-plugins/tmux-resurrect/master/scripts/restore.sh -o "$HOME/.tmux/plugins/tmux-resurrect/scripts/restore.sh"
Actually, found it best to reinstall too in the end:
rm -r "$HOME"/.tmux/plugins/tmux-resurrect
git clone https://github.com/tmux-plugins/tmux-resurrect "$HOME"/.tmux/plugins/tmux-resurrect
from tmux-resurrect.
For me with WSL2 this works:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm ~/.tmux/plugins/tpm/bin/install_plugins
from tmux-resurrect.
Hello,
I received the same error message when I downloaded the files (I didn't use the TPM).
Please let me know which information you need, I will be happy to provide you all necessary information.
BR Marcus
from tmux-resurrect.
Hello Bruno,
thank you very very much for your feedback.
(1) My resurrect.tmux is not in this path, I i use the correct path I see the following:
tmux-resurrect/resurrect.tmux
env: bash: No such file or directory
(2) No, I use tcsh for all users.
(3) which tmux
/usr/local/bin/tmux
(4) which dirname
/usr/bin/dirname
(5)
set -g base-index 1
set -g pane-base-index 1
set -g display-time 5000
set -g repeat-time 1000
set -g status-keys vi
set -g status-utf8 on
set -g status-interval 1
set -g status-left-length 15
set -g status-right-length 55
set -g history-limit 100000
setw -g utf8 on
setw -g window-status-separator " | "
setw -g window-status-format " #I #W "
setw -g window-status-current-format " /#I/ #W "
setw -g window-status-current-attr default
set-option -g lock-command vlock
set -g status-fg white
set -g status-bg blue
setw -g window-status-current-bg yellow
setw -g window-status-current-fg blue
set -g status-left "#[fg=white,bright,bg=blue] Session #[fg=yellow,bright,bg=blue]#S #[default] |" # session-name
set -g status-right "[ #H ]#[default] %d-%m-%Y %H:%M:%S #[default] #[default]"
set -g visual-activity on
set -g bell-action any
setw -g monitor-activity on
setw -g automatic-rename off
bind-key k confirm-before kill-server
bind m
set -g mode-mouse on ;
set -g mouse-resize-pane on ;
set -g mouse-select-pane on ;
set -g mouse-select-window on ;
display 'Mouse: ON'
bind M
set -g mode-mouse off ;
set -g mouse-resize-pane off ;
set -g mouse-select-pane off ;
set -g mouse-select-window off ;
display 'Mouse: OFF'
run-shell ~/tmux-resurrect/resurrect.tmux
from tmux-resurrect.
Hello Bruno,
it was really hard for me as a tcsh user to install a bash :) but I did it.
All is working fine.
Thank you very very much for your help.
BR Marcus
from tmux-resurrect.
Haha, I'm glad everything works now.
bash
is also added as a dependency to the readme.
@ilteris can you please let us know if installing 'bash' helps? If not, let us know error details.
from tmux-resurrect.
Hi Sorry for the late response:
- Running ~/.tmux/plugins/tmux-resurrect/resurrect.tmux in tmux, I get back
set option: @resurrect-strategy-irb -> default_strategy
- I have bash installed, though I am on zsh.
/bin/bash
- which tmux returns:
/usr/local/bin/tmux
- which dirname returns:
/usr/bin/dirname
set-option -g default-shell /bin/zsh
# set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g prefix C-a #set prefix to CTRL-A
unbind C-b #free up default binding
set -sg escape-time 1 #change default delay
set -g base-index 1 #make the windows index start at 1 instead 0
set -g pane-base-index 1 #make the pane index start at 1 instead of 0
bind r source-file ~/.tmux.conf #prefix r to reload conf file
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix #press twice to send it to application running within tmux
#splitting panes
bind | split-window -h
bind - split-window -v
#remapping movement keys to vim movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#cycle through the windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Pane resizing
# START:paneresize
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# END:paneresize
# mouse support - set to on if you want to use the mouse
# START:mouse
set -g mode-mouse on
# END:mouse
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# Set the default terminal mode to 256color mode
# START:termcolor
set -g default-terminal "screen-256color"
# END:termcolor
# enable activity alerts
#START:activity
setw -g monitor-activity on
set -g visual-activity on
#END:activity
# set the status line's colors
# START:statuscolor
set -g status-fg white
set -g status-bg black
# END:statuscolor
# set the color of the window list
# START:windowstatuscolor
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
# END:windowstatuscolor
# set colors for the active window
# START:activewindowstatuscolor
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# END:activewindowstatuscolor
# pane colors
# START:panecolors
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
# END:panecolors
# Command / message line
# START:cmdlinecolors
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# END:cmdlinecolors
# Status line left side
# START:statusleft
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
# END:statusleft
#START:utf8
set -g status-utf8 on
#END:utf8
# Status line right side
# 15% | 28 Nov 18:15
# START: statusright
set -g status-right "#(~/battery Discharging) | #[fg=cyan]%d %b %R"
# END:statusright
# Update the status bar every sixty seconds
# START:updateinterval
set -g status-interval 60
# END:updateinterval
# Center the window list
# START:centerwindowlist
set -g status-justify centre
# END:centerwindowlist
# enable vi keys.
# START:vikeys
setw -g mode-keys vi
# END:vikeys
# shortcut for synchronize-panes toggle
# START:sync
# bind C-s set-window-option synchronize-panes
# END:sync
# Maximize and restore a pane. Only needed for 1.7 and lower.
# START:max
unbind Up
bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
# END:max
# START:restore
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# END:restore
# Log output to a text file on demand
# START:pipe-pane
bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
# END:pipe-pan
# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins " \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
"
# Other examples:
# github_username/plugin_name \
# [email protected]/user/plugin \
# [email protected]/user/plugin \
# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm
run-shell ~/.tmux/plugins/tmux-resurrect/resurrect.tmux
from tmux-resurrect.
Hi Bruno, after I do prefix + Ctrl-s I get
"~/.tmux/plugins/tmux-resurrect/scripts/save.sh" returned 127
on the tmux status line
very strange. I think you are right, this problem has to do with tpm.
from tmux-resurrect.
Hmm.. yea, this is weird.
So apparently key bindings got set up for you - that's good.
But now the save
script returns this error and this is still in the domain of tmux-resurrect
plugin.
When you next get a chance, can you check what output does running a save script directly produces.
So just invoke this in the console ~/.tmux/plugins/tmux-resurrect/scripts/save.sh
and paste the output if there's any. Thanks
from tmux-resurrect.
I just opened up a new window in tmux (prefix + c) and run
~/.tmux/plugins/tmux-resurrect/scripts/save.sh
and I got back Tmux environment saved!
I go back to my previous window (prefix + 1) and tried the prefix + ctrl-s here but 127 error again.
I am in vim in this window. Maybe vim is messing up things? Thanks for the patience @bruno-
from tmux-resurrect.
Hmm, strange things happening for sure, I just committed my dotfiles along with tmux-resurrect and found out that there a lot of txt files committed along with other things. Little inspection revealed that they are indeed tmux sessions that are saved. One example:
pane 0 1 :vim 1 :* 1 :/Users/ilteris/dotfiles/tmux/plugins 1 vim :vim /Users/ilteris/.tmux.conf
pane 1 1 :vim 0 : 1 :/Users/ilteris/Desktop/flux 1 vim :vim gulpfile.js readme.md
pane 1 2 :zsh 0 : 1 :/Users/ilteris/Desktop/flux 1 zsh :
pane 1 3 :zsh 1 :* 1 :/Users/ilteris/dotfiles/vim 1 bash :
pane 1 4 :egg 0 :- 1 :/Users/ilteris/Desktop/react 1 vim :vim first.html
pane 1 5 :vim 0 : 1 :/Users/ilteris 1 vim :vim /Users/ilteris/.vimrc
window 0 1 1 :* c83d,159x46,0,0,0
window 1 1 0 : cebf,118x48,0,0,2
window 1 2 0 : cec0,118x48,0,0,3
window 1 3 1 :* cec1,118x48,0,0,4
window 1 4 0 :- cec2,118x48,0,0,5
window 1 5 0 : cec3,118x48,0,0,6
state 1
A lot of these files are empty files. So I am guessing everytime I press save, it generates a txt file and puts in under this dir.
from tmux-resurrect.
You can make debugging the scripts much easier by putting set -x
at the top (below the shebang). This will turn on tracing and tell you every line that they execute.
from tmux-resurrect.
@ilteris, it's been a while we've talked about this, do you still have this issue?
from tmux-resurrect.
@bruno- So, it's still quite mystery. I gave up on it after our conversation. Then months later, I purchased a new laptop since we talked. I pretty much set it up, transferred my dotfiles and voila. Now I do have a working tmux-resurrect! I love it so much.
However, it still doesn't work in the previous laptop. I guess we can close it. Thanks a lot!
from tmux-resurrect.
Hi, thank you for providing feedback on this. Also, I'm glad things work for you now.
Yea, since it seems not a lot of other users are having this issue let's close it for now.
If anyone is experiencing this issue and is willing to spend some time investigating, please feel free to reopen and I'd be glad to help.
from tmux-resurrect.
Thanks @bruno-!
On Tue, Feb 10, 2015 at 10:38 AM, Bruno Sutic [email protected]
wrote:
Hi, thank you for providing feedback on this. Also, I'm glad things work
for you now.Yea, since it seems not a lot of other users are having this issue let's
close it for now.
If anyone is experiencing this issue and is willing to spend some time
investigating, please feel free to reopen and I'd be glad to help.—
Reply to this email directly or view it on GitHub
#41 (comment)
.
from tmux-resurrect.
I had a similar issue; the following did it for me:
https://git.2li.ch/tmux/tpm/commit/e51a3772b5e312900ea416740e14195df7cf4c22
I use a Mac laptop, so I included the address where Tmux is installed before any calls to run-shell
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin:/opt/homebrew/bin"
from tmux-resurrect.
Related Issues (20)
- resurrect files not saving expected data
- Save env variables as well
- Restoring non-existing directories
- Save problems
- Tests failing on clean checkout from master. HOT 1
- Description in document save_dir.md is not complete
- Problem recreate windows
- How to start tmux server with resurrect
- resurrect creates minimal sized horizontal splits
- Resurrect not saving the tmux session as intended HOT 2
- C-b C-r to restore session will end up with [exited] from tmux client on iSH(iOS alpinelinux)
- Login shell not invoked for zsh
- [Question] Create new sessions/windows/layouts using a file - supported?
- [BUG] saving with nvim opens the incorrect files if you have spaces in filenames
- How to upgrade from 3.0 and keep saved sessions ?
- [Bug] Restoring sessions is adding a new empty prompts everytime
- [BUG] Hooks pre-restore-all and post-restore-all don't work correctly with tmux v3.4 HOT 1
- plugin not saving correct command
- automatically restore HOT 1
- Does not save, does not restore, returned 127
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmux-resurrect.