question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set-Clipboard Linux

See original GitHub issue

Summary of the new feature/enhancement

PowerShell’s [SG]et-Clipboard functional independence.

How to work with the clipboard in Linux using PowerShell? If the cmdlet Get-Clipboard requires installing xclip (gcb is a stub?), then what about Set-Clipboard? You can certainly use native utilities, but why then useless cmdlets?

My Environment

OS: KDE neon User Edition 5.20 x64 PowerShell v7.1.2 (manual install: download, unpack, symlink to /usr/bin) xclip v0.13-1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
iSazonovcommented, Feb 16, 2021

can you please re-tag as a bug

Now it is in Work Groups competence 😃 so I stopped all review work on issues.

2reactions
mklement0commented, Feb 16, 2021

Good point - I also see the problem in 7.1.2 and 7.2.0-preview.3, on Ubuntu 18.04, and this is clearly a bug.

The problem must be related to how PowerShell waits for xclip to exit.

Please update your original post with the details of your environment, as requested in the issue template (edit: I now see that you used the “Feature Request/Idea” rather than the “Bug” template - only the latter requests this information, but since this actually a bug, it should be added), and please change the issue title to reflect that Set-Clipboard on Linux with xclip present hangs.

The workaround for now is to use xclip explicitly; e.g., 'foo' | xclip -selection clipboard

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipe to/from the clipboard in a Bash script
If you're in Linux terminal mode (no X) then look into gpm or Screen which has a clipboard. Try the Screen command readreg...
Read more >
Set-Clipboard (Microsoft.PowerShell.Management)
The Set-Clipboard cmdlet sets the contents of the clipboard. Note On Linux, this cmdlet requires the xclip utility to be in the path....
Read more >
[SOLVED] ssh set clipboard of remote machine
Hi everyone,. I would like to set the clipboard of a remote ssh server machine through ssh. For example, I have machine A...
Read more >
How To Copy Command Output To Linux Clipboard Directly
Explains how to copy and paste from UNIX / Linux shell prompt to X applications clipboard from shell prompt using xclip/xsel command.
Read more >
How to Use the Set-Clipboard Cmdlet in PowerShell?
To copy the content to the clipboard, first, use the “Set-Clipboard” cmdlet, then specify the text or file path to be copied. Syntax....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found