support osc 52 clipboard copy integration.#899
support osc 52 clipboard copy integration.#899acornejo wants to merge 1 commit intomobile-shell:masterfrom
Conversation
c7f2b8f to
bdff1e1
Compare
|
Sorry to not respond to this earlier, I got reminded of this when looking at mosh-chrome issues. This actually looks reasonable, and I'm considering pulling it for the next version of Mosh. The one thing I want to think about is that a 100KB paste is a relatively large object to be passing in a single SSP message, and I see a bit of potential for excessively-large messages getting packets dropped by too-short network queues, causing the session to stall. Mosh has only ever promised to deliver a faithful, usable terminal window to the client; it's never promised to deliver any particular sequence of bytes reliably from server to client. This patch would bend that slightly, and it does require some arbitrary size limit (100KB actually seems fairly reasonable). |
|
Could we make it 16 KiB? :-) I'd feel more comfortable with something in
that range. A single 100 KiB Instruction is going to perform really poorly
on a network with any significant loss, since Mosh basically requires every
fragment to get there to make forward progress.
…On Jul 24, 2017 4:43 PM, "cgull" ***@***.***> wrote:
Sorry to not respond to this earlier, I got reminded of this when looking
at mosh-chrome issues.
This actually looks reasonable, and I'm considering pulling it for the
next version of Mosh. The one thing I want to think about is that a 100KB
paste is a relatively large object to be passing in a single SSP message,
and I see a bit of potential for excessively-large messages getting packets
dropped by too-short network queues, causing the session to stall.
Mosh has only ever promised to deliver a faithful, usable terminal window
to the client; it's never promised to deliver any particular sequence of
bytes reliably from server to client. This patch would bend that slightly,
and it does require some arbitrary size limit (100KB actually seems fairly
reasonable).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#899 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMwOzIbpaCeqwfBWPOD3aLqFMpKdGvAks5sRSwQgaJpZM4OZGgQ>
.
|
This feature is particularly relevant for mosh for chrome (which also used in windows I believe).
|
Thanks for the feedback. Changed max clipboard size to 16k, I think that is more than enough for most uses of the clipboard. |
|
Hi, will this patch resolve the following: If I change ssh to mosh, tmux buffer doesn't appear in mac clipboard. Looks like tmux is using osc 52 to do that? If this patch would fix that, that would be awesome) |
|
Yup, it will fix that too. |
|
Wow, cool. Sorry, dumb question: do I need to patch both server and client side to make it work? I want to try to build it |
|
Ok, I tried to build just client, and connecting with new client to old mosh server did not fix the issue with tmux clipboard that I described before. |
|
If the new server is not sending you clipboard data I will be surprised if
the client works.
|
|
Pulled. Thanks! |
|
@acornejo I forgot to follow up about the source-code formatting: Where do you find the source code style to be badly inconsistent? I find it mostly consistent with Emacs formatting set for cc-mode, with 8-character tab stops, and KeithW's odd style of including spaces in parentheses in most contexts. ocb.cc is a major exception, because that was copied into the project, and there's value in retaining that security-critical code as contributed, for ease of comparison with the original and other forks. There's a few other files that are a little inconsistent but I haven't found it a major issue. I personally would like to reformat the source (and get rid of the spaces around the parens, which really annoy me), but that's a project-wide decision. I'd certainly like to see your clang-format machinery, or at least the clang-format invocation you use, to see what we might get-- I haven't used it much myself, and not for quite a while. |
Yep, you need to build the server and the client. |
This feature is particularly relevant for mosh for chrome (which is also used in windows I believe). Closes #637
PS: Someone should seriously consider running this codebase through clang-format, the coding style is all over the place, I did my best to be consistent with the existing style, but even simple things like tab/spaces are mixed in the codebase. If this is something the mantainers want, I would be happy to submit a pullrequest that passes the entire codebase through clang-format, together with a travis test that will fail for pull requests that don't follow the style.