# JUCE uses the wrong X11 selection for pasting

**URL:** <https://forum.juce.com/t/juce-uses-the-wrong-x11-selection-for-pasting/45330>\
**Category:** Linux\
**Created:** [April 1, 2021, 10:23pm UTC](https://forum.juce.com/t/juce-uses-the-wrong-x11-selection-for-pasting/45330 "2021-04-01T22:23:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbert-vdh](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@robbert-vdh](https://forum.juce.com/u/robbert-vdh)\
**Post date:** [April 1, 2021, 10:23pm UTC](https://forum.juce.com/t/juce-uses-the-wrong-x11-selection-for-pasting/45330/1 "2021-04-01T22:23:32Z")

</div>

On Linux, JUCE has always used the wrong X11 selection for pasting. Pasting using either Ctrl+V or by right clicking and pasting from the context menu will currently (as of JUCE 6.0.8) insert text stored from the `PRIMARY` selection, i.e. the selection containing text the user has last highlighted/selected. Instead, pasting should be done from the `CLIPBOARD` selection, as mentioned in [this specification](https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt).

The current behavior mostly causes issues for plugins with text fields for entering serial numbers or passwords. Those are often directly copied from a website or password manager without being visible to the user, and thus they will end up in the `CLIPBOARD` selection but not in `PRIMARY`.

---

<div class="post-metadata">

**Author:** ![robbert-vdh](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@robbert-vdh](https://forum.juce.com/u/robbert-vdh)\
**Post date:** [April 6, 2021, 11:23am UTC](https://forum.juce.com/t/juce-uses-the-wrong-x11-selection-for-pasting/45330/2 "2021-04-06T11:23:40Z")

</div>

For historical context, this bug has been fixed in [faf5ed4](https://github.com/juce-framework/JUCE/commit/faf5ed40234c038c67c15220400f3ffacd4b323c) (currently on the develop branch).
