You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing tmux send-keys ... does of course work but will require to use pipe-paneand results in only having a log file to tail the piped stdout/err from the tmux session..
If going:
fromfabricimportConnectionc=Connection('root@192.168.1.1')
c.run("tmux attach-session -t my_session", pty=True)
# i want to run commands inside the attached session now
Obviously it will block at c.run and provide interactive terminal to the tmux session on the server we connected to. Disabling pty will yield to the "not a terminal" error.
What is the way to attach to a potentially already existing tmux session on a remote machine, run commands and cleanly get the exit codes, stderr, stdout using fabric?
The text was updated successfully, but these errors were encountered:
Doing
tmux send-keys ...
does of course work but will require to usepipe-pane
and results in only having a log file to tail the piped stdout/err from the tmux session..If going:
Obviously it will block at c.run and provide interactive terminal to the tmux session on the server we connected to. Disabling pty will yield to the "not a terminal" error.
What is the way to attach to a potentially already existing tmux session on a remote machine, run commands and cleanly get the exit codes, stderr, stdout using fabric?
The text was updated successfully, but these errors were encountered: