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

fix(clipboard): correct clipboard when used through SSH or WSL #20

Merged
merged 2 commits into from Mar 8, 2023

Conversation

jboillot
Copy link
Contributor

@jboillot jboillot commented Mar 7, 2023

Hello,

First, sorry for the PR #18 that was buggy. When I noticed it, I put it in draft, but I should have written a clearer message!

This PR has been tested and it works both on WSL and through SSH. Here are some insights:

  • Previously, the arboard clipboard was always initialized, which caused errors on WSL and SSH sessions. Now, it is initialized lazily and as a last resort.
  • I discovered it was necessary to provide piped stdout and stderr output channels to the child process clip.exe on WSL otherwise the command fails.
  • The way to set the clipboard through SSH uses an ANSI sequence (OSC52) that is not supported by all terminals (for example, not GNOME Terminal). However, I guess it is still better than nothing!

@jboillot jboillot marked this pull request as ready for review March 7, 2023 18:13
@jboillot jboillot marked this pull request as draft March 7, 2023 18:52
@jboillot jboillot marked this pull request as ready for review March 7, 2023 19:06
@Brooooooklyn Brooooooklyn changed the title bugfix(clipboard): correct clipboard when used through SSH or WSL fix(clipboard): correct clipboard when used through SSH or WSL Mar 8, 2023
@Brooooooklyn
Copy link
Owner

@jboillot nevermind, thanks!

@Brooooooklyn Brooooooklyn merged commit 9cc501a into Brooooooklyn:main Mar 8, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants