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

Sequence passthrough #846

Closed
disarmer opened this issue Mar 30, 2017 · 10 comments
Closed

Sequence passthrough #846

disarmer opened this issue Mar 30, 2017 · 10 comments

Comments

@disarmer
Copy link

Hi!
I'm using tmux 2.3 locally as terminal tabs and same version remotely (nested tmux via ssh) on archlinux and ubuntu hosts. It's works perfectly, but i have problem with terminal sequence passthrough.

In plain terminal this sequence works (it's urxvt notification):
printf %b '\033]777;notify;test;test\007\007'

In one tmux passthrought sequence works too:
printf %b '\033Ptmux;\033' '\033]777;notify;test;test\007\007' '\033\\'

By my assumption, double sequence should work in nested tmux, but it doesn't (i'm getting freezed pane instead, until i'll close connection):
printf %b '\033Ptmux;\033' '\033Ptmux;\033' '\033]777;notify;test;test\007\007' '\033\\' '\033\\'
It there any way to pass sequence through two tmux?

========
TERM=tmux-256color inside, and TERM=rxvt-unicode-256color outside
% uname -sp && tmux -V && echo $TERM
Linux unknown
tmux 2.3
tmux-256color

@nicm
Copy link
Member

nicm commented Apr 3, 2017

I don't think you are escaping \033 and \ enough times in the second case.

\033]777;notify;test;test\007\007
\033Ptmux;\033\033]777;notify;test;test\007\007\033\
\033Ptmux;\033\033Ptmux\033\033\033\033]777;notify;test;test\007\007\033\033\\\033\

@disarmer
Copy link
Author

disarmer commented Apr 3, 2017

Hm, last command still doesn't work, but not freezing terminal, just prints nothing.

If i start tmux server with -vvvvvv, running second sequence, i get this output in log:

1491259766.123269 input_parse: %0 ground, 34 bytes: \033Ptmux;\033\033]777;notify;test;test\a\a\033\\
1491259766.123280 input_dcs_dispatch: "tmux;\033]777;notify;test;test\a\a"

Looks fine, notification working.

Then i'll start nested tmux, run third sequence and get this in external tmux log:

1491260284.622434 input_parse: %0 ground, 50 bytes: \033Ptmux\033\033]777;notify;test;test\a\a\033\\\033[1;1H\033[1;49r\033[2B
1491260284.622452 input_dcs_dispatch: "tmux\033]777;notify;test;test\a\a"

Almost same, but notification not working.

@nicm
Copy link
Member

nicm commented Apr 4, 2017 via email

@disarmer
Copy link
Author

disarmer commented Apr 4, 2017

Yes, i tried with just one window in external and one window in nested tmux, so both are active

@nicm
Copy link
Member

nicm commented Apr 4, 2017 via email

@disarmer
Copy link
Author

disarmer commented Apr 4, 2017

Done:
outer tmux: https://dpaste.de/iLLG
inner tmux: https://dpaste.de/TuHL

@nicm
Copy link
Member

nicm commented Apr 4, 2017 via email

@disarmer
Copy link
Author

disarmer commented Apr 4, 2017

Ah, yes, it's working with semicolon:
printf %b '\033Ptmux;\033\033Ptmux;\033\033\033\033]777;notify;test;test\007\007\033\033\\\033\'
Thank you a lot!

@wilhelmy
Copy link

Where can I find documentation about this \033P escape sequence?

@lock
Copy link

lock bot commented Feb 15, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants