-
Notifications
You must be signed in to change notification settings - Fork 59
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
osc52 support for hterm paste to clipboard #40
Comments
I hear what you're saying about feature parity with Secure Shell and the expectations of Chrome users. However, I've got bigger fish to fry right now. Maybe someone else will see this bug and volunteer their C++ chops to the cause. But I will say that this really needs to make it upstream. I'd consider cherrypicking the fix from upstream if an upstream Mosh release were a long way off, just to get it in a little sooner since it is a matter of feature parity with Secure Shell. |
That makes sense. One thing that has made it upstream is vt100 mouse mode. In Chrome Secure Shell I can select panes in tmux, drag borders to resize, move cursor in vim etc. Would you consider cherry picking something like that? mobile-shell/mosh#461 |
keithw@ has suggested there will be a Mosh release this summer, so I'm inclined to wait instead of cherrypicking. |
👍 @shirro this is a showstopper for me as well: I rely on OSC-52 to yank text to my system clipboard. 😱 |
@rpwoodbu Thanks! Under initial tests, the new mosh 1.2.5 seems to have fixed OSC-52. 👍 I need to test this on other machines though. I'll reply in (hopefully) a few days with an answer. |
That's interesting. We definitely did not add support for OSC-52 in mosh. It's a non-trivial feature request; it's another variation of the "but I want this reliable byte stream" problem. |
@cgull you're right 😞, I finally got to test mosh 1.2.5 on a remote server and OSC-52 doesn't work. 😓 What happened in my initial (localhost) test was that my yank script also used X11 to copy text into my system clipboard, as a fallback, creating the illusion that mosh was actually passing OSC-52 through. 😅 |
Realizing from @cgull's comment that this requires a non-trivial enhancement to the upstream mosh which isn't likely coming anytime soon, I'm going to close this for now. Please ping this when/if this becomes available upstream, and I'll reopen. |
I am trying to switch to chrome os, and using mosh is part of that effort. This is a big issue for me. Could we reopen this issue? I am happy to contribute a patch for this. |
I have implemented this in pull request I am a bit weary though, since I see there are multiple PR's on that project, some of them over a year old that have not received a single comment from the mantainers. |
I'll gladly reopen this (if needed) once your PR is in an official upstream Mosh release. It isn't terribly difficult to build Mosh for Chrome, nor build it using your GitHub fork of the upstream Mosh which has your fixes, so you could get this in for yourself sooner. There's some documentation on building Mosh for Chrome in the GitHub wiki. |
Sounds good. Hopefully one of the mosh maintainers can take a look over the patch and send me some feedback so that it eventually gets merged. Perhaps @cgull would be interested in taking a look, since I see he commented on this bug as well. Regarding building+running my own fork... when I was younger I enjoyed running my forked versions of everything (including obscure kernel patches). These days I am too old/lazy/busy to keep up with that. In fact this is part of the reason I am giving chrome os a try (coming from linux), so having to use it with customized extensions that I maintain kind of defeats the point. Of course, if it turns out that its impossible for me to get this feature without building my own fork, I will read up on the wiki and revisit this decision. |
mobile-shell/mosh#899 got merged. Could we get a new mosh-chrome release? |
@acornejo Glad you got your PR in! However, I stick with the actual released versions of the upstream Mosh code, so we'll need to wait until they do another release. They just did one (and I haven't quite gotten that out the door yet, still only in the dev track), so it may be a little bit. |
hterm supports osc52 to write from the term to the system clipboard. There are examples of a shell command and vim plugin in libapps/hterm/etc. I have found this works well with Chrome Secure Shell packaged app but when I use mosh, either the packaged app or start mosh over Secure Shell the osc sequence doesn't appear to get through the mosh terminal emulation.
This is probably an upstream issue for mosh. I added a comment at mobile-shell/mosh#382 (comment) but I don't know if it is something that would be fixed upstream. It might be an idea to patch mosh for mosh-chrome because this limits mosh-chrome compared with the Secure Shell app that sets expectations on Chrome. I have looked at the mosh terminal emulation and unfortunately c++ isn't my thing. It looks like they capture OSC sequences and use them for set title and possibly discard the rest but I am not sure how to fix it.
btw tmux also eats osc52 which limits usefullness until I can find a patch for that as well. if testing make sure you aren't running tmux.
The text was updated successfully, but these errors were encountered: