To reproduce:
seq 10000 | /usr/bin/xsel -b
/usr/bin/xsel -b
Observed output: either of:
- nothing
- the correct output
- the correct output + a few lines of trash at the end
The output changes randomly between those three even if I run xsel -b
multiple times without resetting it with the pipe to stdin!
The input has to be large enough: seq 1000
does not work. The actual bytes don't seem to matter, only the input size.
Once I do seq 10000 | /usr/bin/xsel -b
:
xclip -selection clipboard -o
is also corrupted, but in a different weird way- pasting with Ctrl + V on a textarea seems to work normally
I do not reproduce this if I try to set the textarea with:
- Ctrl + C
seq 10000 | xclip -selection clipboard
so it seems to be a problem in the way xsel handles the stdin input.
Using -i
and -o
did not change anything.
The problem started today "by itself".
If you reproduce, please add a comment below.
Ubuntu 14.04 AMD64, xsel 1.2.0.
0 Answers