-
Notifications
You must be signed in to change notification settings - Fork 12
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
Remote tmux session using :socket leads to wrong tmux path inside session #10
Comments
Hi, If I understand correctly, you can use |
So on this remote machine I log in to there are two tmux versions: a global one under
In my first comment I added some remarks pointing out what worked as intended and what did not work. |
Hi, I tried to reproduce the problem for myself by first creating a socket forwarded socket:
And by creating a new session from the socket:
Then by creating a new session on the remote:
After attaching, If I compare
on the two sessions, I only see minor differences ( I get the same result for
on both sessions. I have versions 2.8 locally and 2.3 remotely. So it could be that your tmux versions are just incompatible. Have you tried comparing the socket creation with the two different tmuxes? ie:
or
Perhaps this is the culprit? |
I finally found some time to try this out:
¹ USER: my username at the local machine As you can see there are bigger differences in
Since the socket creation is only possible with the second version, and the same problem persists, this does not seem to be the culprit. EDIT: Today when using the output function discussed in issue #6 I experienced something new: I could send the command to the tmux remote server (verified via direct ssh control over command line), BUT after calling
After I did |
To check the output of my tmux session, I have to attach to the session in a terminal (output directly to org is not yet supported). I noticed that I can not "tmux detach" or "tmux ls" because of tmux version issues. Using
C-b d
to detach still works. So I can work around it, but I noticed this inconsistency and wanted to report it.Edit: I found out the reason for this behaviour - it is that the tmux session I attach to itself is created by tmux 3.0a, but the tmux path inside the session is different and so the tmux version is different as well (1.8). Therefore they are not compatible and the active tmux session can not be controlled via shell commands. This only happens with ob-tmux and not with a manually created session - this is what I wanted to report with this issue.
On my local machine I've got (works as expected)
On the remote machine I've got (works as expected):
If I open a tmux session from my terminal and start a new session with
tmux new -d
and then attach to it I get (works as expected):If I use ob-tmux to open a tmux session following the README where in the end I have a code block somewhat like this
#+BEGIN_SRC tmux :socket ~/.tmux-local-socket-remote-machine :session tmuxtest
and then attach to it from my terminal I get (does not work as expected):I already tried to specify the desired path
/usr/local/bin/tmux
inorg-babel-tmux-location
(and soft- and hardlinked tmux on my own machine to this place, since otherwise ob-tmux did not create a session. The result was still the one you see above.Here are some details on my setup, please tell me if you need more:
GNU Emacs 26.3Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)
The text was updated successfully, but these errors were encountered: