Skip to content
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

Pass OSC52 from nested tmux session #565

Open
MoetaYuko opened this issue Apr 23, 2022 · 3 comments
Open

Pass OSC52 from nested tmux session #565

MoetaYuko opened this issue Apr 23, 2022 · 3 comments

Comments

@MoetaYuko
Copy link

Disclaimer: I'm not sure if this is relevant to #242 or ever under the scope of this project

A common scenario for nested tmux is the outer one on local machine and the inner one on remote machine over ssh:
Terminal emulator -> Local tmux (outer) -> SSH -> Remote tmux (inner) -> Remote CLI applications

However, OSC52 sequence from remote CLI applications cannot reach the terminal emulator. I tested the following:

Workflow Working?
Terminal emulator -> Local CLI applications ✔️
Terminal emulator -> Local tmux -> Local CLI applications ✔️
Terminal emulator -> SSH -> Remote CLI applications ✔️
Terminal emulator -> SSH -> Remote tmux -> Remote CLI applications ✔️
Terminal emulator -> Local tmux -> SSH -> Remote tmux -> Remote CLI applications

Is it possible to make OSC52 sequence from remote CLI applications "passthrough" remote tmux and reach local machine?

@broander
Copy link

You can do this with vanilla tmux and a carefully-crafted .tmux.conf file. Here's the relevant documentation on how you can set up your tmux.conf file to allow this: https://github.com/tmux/tmux/wiki/Clipboard#terminal-support---tmux-inside-tmux

@MoetaYuko
Copy link
Author

You can do this with vanilla tmux and a carefully-crafted .tmux.conf file. Here's the relevant documentation on how you can set up your tmux.conf file to allow this: https://github.com/tmux/tmux/wiki/Clipboard#terminal-support---tmux-inside-tmux

Thanks for the info. It's as simple as adding set -s set-clipboard on to .tmux.conf.local

@gpakosz gpakosz reopened this Mar 22, 2023
@gpakosz
Copy link
Owner

gpakosz commented Mar 22, 2023

Keeping this open as I want to come up with a solution that works for tmux 2.4+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants