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.

Ubuntu 18.04 xsel 1.2.0

First of all I don’t know if is a xsel or cht.sh client problem.

Shell mode:

$ cht.sh --shell
cht.sh> cd python
cht.sh/python> append file

#  python - How do you append to a file?

with open("test.txt", "a") as myfile:
    myfile.write("appended text")

cht.sh/python> copy
copy: 4 lines copied to the selection

The output says it was copied. I try to paste (ctrl + v) it somewhere and I realized it was not on the clipboard.

But if I run the xsel command it shows the output:

$ xsel 

#  python - How do you append to a file?

with open("test.txt", "a") as myfile:
    myfile.write("appended text")

I can reproduce something like:

$ cat /etc/hosts | xsel --clipboard

And this works with either ctrl + v or the xsel command.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chubincommented, Jul 21, 2018

If you say that you can see it with xsel but you can’t paste it, it means that it is copied to the selection buffer of X Window (PRIMARY), but not to the clipboard (CLIPBOARD).

It depends on that where you try to paste it in. For example, if you paste it into xterm or vim running in xterm it is PRIMARY what used here, and if you are trying to paste it indo Google Docs running inside Firefox it is CLIPBOARD what is used here.

How could check it:

edit cht.sh and change every occurrence of xsel -i with xsel -bi.

After that it should work as you expect.

The main question of course still remains, what should be used by default PRIMARY or CLIPBOARD or both? We currently use PRIMARY as it is the main selection buffer in X Window.

@juliuswz,

  1. Please test, whether my conjecture is correct,
  2. Please share your thoughts about the PRIMARY/CLIPBOARD controversy.
0reactions
chubincommented, Aug 2, 2018

@juliuswz Agree. I think we should use xsel -bi in the client. Will be fixed soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Copy and Paste Not Working on Windows 10
How to fix copy and paste not working? · Close any video players · Close any open applications · Clear your clipboard ·...
Read more >
How to Fix It When Copy and Paste Isn't Working in Windows ...
One of the most common causes of copy and paste issues on Windows is when an installed application is interfering with the clipboard....
Read more >
How to Fix Copy and Paste Not Working in Windows
How to Fix Copy and Paste Not Working in Windows · 1. Update Windows · 2. Temporarily Disable Antivirus Software · 3. Run...
Read more >
7 Methods to Fix Copy and Paste Function Not Working
7 Solutions to Fix Copy and Paste Not Working Windows 10 ; Solution 1: Close Open Applications ; Solution 2: Check Your System...
Read more >
How to Fix When Copy-Paste Isn't Working - Alphr
Copy-Paste Not Working in Windows 10 · Check if Windows Is Updated · Keyboard Troubleshooting · Check for Viruses · Close Open Applications...
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