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

Ability to copy output to clipboard #717

Closed
mbierman opened this issue Aug 19, 2022 · 4 comments
Closed

Ability to copy output to clipboard #717

mbierman opened this issue Aug 19, 2022 · 4 comments
Assignees
Labels
✨ enhancement New feature or request
Milestone

Comments

@mbierman
Copy link

Feature description

I often use pbcopy on the mac to grab command output to the clipboard.

This can be used with webssh too via: xclip -sel clip. For example:

cat filename | xclip -sel clip

but currently this error is given:

Error: Can't open display: (null)

This explanation (with 56 votes) seems to address it, but I am not sure how to put this into effect with Web SSH?

This will require webssh to support X11 Forwarding which would allow copying output of a command to the clipboard!

Screenshots / Draws

@isontheline isontheline self-assigned this Aug 19, 2022
@isontheline isontheline added the ✨ enhancement New feature or request label Aug 19, 2022
@isontheline
Copy link
Owner

Thank you @mbierman 🙏

@mbierman mbierman changed the title X11 Forwarding X11 Forwarding to copy output to clipboard Aug 19, 2022
@isontheline isontheline added this to the 20 - Moon milestone Nov 10, 2022
@isontheline isontheline changed the title X11 Forwarding to copy output to clipboard Ability to copy output to clipboard Nov 15, 2022
@isontheline
Copy link
Owner

Hello @mbierman 👋

As I can't implement X11 Forwarding inside WebSSH - yet - I have implemented OSC 52 Terminal Sequence (https://chromium.googlesource.com/apps/libapps/+/a5fb83c190aa9d74f4a9bca233dac6be2664e9e9/hterm/doc/ControlSequences.md#osc)

In order to copy some data to your macOS / iOS clipboard from the terminal you will need to use this for example :
echo "WebSSH is awesome!" | wshcopy
cat filename | wshcopy

wshcopy command can be installed on your servers using : pip3 install webssh-sh

Hope this will stick to your need

@isontheline
Copy link
Owner

I've also added documentation about this feature here : https://webssh.net/documentation/help/howtos/copying-text-to-clipboard-from-terminal/

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

2 participants