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

Add support for Mosh #9

Open
spudlyo opened this issue Jan 23, 2020 · 9 comments
Open

Add support for Mosh #9

spudlyo opened this issue Jan 23, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@spudlyo
Copy link
Owner

spudlyo commented Jan 23, 2020

Clipetty depends on the SSH_TTY environment variable to determine if you're running on a local or remote host. This obviously doesn't work if you're logged in via Mosh.

I don't see any reason why we couldn't support Mosh, so let's make it work!

@spudlyo spudlyo self-assigned this Jan 23, 2020
@spudlyo spudlyo added the enhancement New feature or request label Jan 23, 2020
@ceblan
Copy link

ceblan commented May 1, 2020

+42 to mosh support!!!

Meanwhile, I'm able to benefit clipetty in mosh by making an ssh connetion and attaching from it to the same tmux session in mosh. Then, I can dettach the tmux session from the ssh tty but I need to keep the ssh connection up sine die in order to have clippety work in mosh. As soon as ssh connection is down, clipetty stops working in mosh.

Do you think if it would be posible to manually set SSH_TTY="mosh tty" (lets say /dev/pts/X or whatever the mosh tty is) inside emacs just to avoid the ssh connection workaround? Would it work this way?

Cheers!

@ztlevi
Copy link

ztlevi commented Sep 29, 2020

Any progress on mosh integraion?

@shuxiao9058
Copy link

how is go on this feature request?

@spudlyo
Copy link
Owner Author

spudlyo commented Jan 10, 2021

I've discovered a way of getting OSC-52 escape sequences past tmux without having to rely on the SSH_TTY environment variable. This is good news in that there are a couple of issues that revolve around this environment variable becoming stale, or being otherwise modified.

I think there is a path forward for supporting Mosh!

@ztlevi
Copy link

ztlevi commented Jan 7, 2022

any progress since a year?

@nanzhong
Copy link

nanzhong commented Oct 24, 2022

For what it's worth, I've been making use of a workaround that addresses my use cases of:

  • iPadOS (blink) -> ssh -> tmux -> emacs running remotely (both emacs and emacsclient with server)
  • iPadOS (blink) -> mosh -> tmux -> emacs running remotely (both emacs and emacsclient with server)

I make use of printing the OSC 52 escape sequences to the tty associated with the current tmux pane, and that seems to work in both of those scenarios.

To do this I set clipetty-tmux-ssh-tty to "echo \"SSH_TTY=$(tmux display-message -p '#{pane_tty}')\"".

@shlevy
Copy link

shlevy commented Feb 7, 2024

@spudlyo Is this something a new contributor might be able to help with?

@z3t0
Copy link

z3t0 commented Feb 18, 2024

I am very interested in helping out on this. Just need a pointer in the right direction.

Is the solution just to write to stdout?

ramLlama pushed a commit to ramLlama/emacs-d that referenced this issue Mar 11, 2024
@pweibert
Copy link

With #33 I can copy to my clipboard in kitty mosh, kitty ssh, kitty local. It should not affect tmux functionality. But since I've never used tmux I would be glad if someone can confirm this.

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

No branches or pull requests

8 participants