[GH-ISSUE #101] Option to limit Clipboard to Text only #77

Open
opened 2026-05-05 05:00:13 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @W4RH4WK on GitHub (Jul 22, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/101

I just noticed the cursor bugging out when moving between screens (hosts).
Based on the info / debug output: my clipboard contains an image, which Barrier tries to convert, for whatever reason. As soon as I copied some text into the clipboard everything was back to normal.

While I certainly like the feature of image-based clipboard-sharing, maybe a switch for limiting clipboard-sharing to text only would be nice.

Originally created by @W4RH4WK on GitHub (Jul 22, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/101 I just noticed the cursor bugging out when moving between screens (hosts). Based on the info / debug output: my clipboard contains an image, which Barrier tries to convert, for whatever reason. As soon as I copied some text into the clipboard everything was back to normal. While I certainly like the feature of image-based clipboard-sharing, maybe a switch for limiting clipboard-sharing to text only would be nice.
gitea-mirror added the
enhancement
label 2026-05-05 05:00:13 -06:00
Author
Owner

@gelldur commented on GitHub (Oct 11, 2018):

Same here also same on old Synergy. When I make screenshot via eg. xfce4-screenshooter then I copy to clipboard everything "hangs" (I don't see mouse and keyboard doesn't respond). Only can switch to other TTY and kill app to get back control.

<!-- gh-comment-id:428872641 --> @gelldur commented on GitHub (Oct 11, 2018): Same here also same on old Synergy. When I make screenshot via eg. `xfce4-screenshooter` then I copy to clipboard everything "hangs" (I don't see mouse and keyboard doesn't respond). Only can switch to other TTY and kill app to get back control.
Author
Owner

@p12tic commented on GitHub (Oct 13, 2018):

I've observed something similar too. Seems that whenever clipboard has a lot of data and the cursor moves between screens all the data is transferred synchronously causing jitter. This is especially noticeable on slower connections like wifi.

<!-- gh-comment-id:429513955 --> @p12tic commented on GitHub (Oct 13, 2018): I've observed something similar too. Seems that whenever clipboard has a lot of data and the cursor moves between screens all the data is transferred synchronously causing jitter. This is especially noticeable on slower connections like wifi.
Author
Owner

@ghost commented on GitHub (Apr 28, 2019):

This is crashing my server, would really appreciate if someone could do this.

<!-- gh-comment-id:487369032 --> @ghost commented on GitHub (Apr 28, 2019): This is crashing my server, would really appreciate if someone could do this.
Author
Owner

@GwylimWilliams commented on GitHub (May 9, 2019):

I am also having trouble with this but it would be preferable to fix the issue with "large" data in the clipboard crashing/hanging the server please.

Server and client are both xubuntu.

<!-- gh-comment-id:490888399 --> @GwylimWilliams commented on GitHub (May 9, 2019): I am also having trouble with this but it would be preferable to fix the issue with "large" data in the clipboard crashing/hanging the server please. Server and client are both xubuntu.
Author
Owner

@ghost commented on GitHub (Nov 14, 2019):

I had to disable clipboard in the barrier config at work (since I work with images a lot) because the server swelled to 200-400mb of ram and finally froze my input completely several times forcing me to switch tty to kill it. Don't ask how many times it took me to figure that out..
In newer synergy there is a setting for limiting clipboard size which I would really appreciate to be added to barrier, thanks!

<!-- gh-comment-id:554064927 --> @ghost commented on GitHub (Nov 14, 2019): I had to disable clipboard in the barrier config at work (since I work with images a lot) because the server swelled to 200-400mb of ram and finally froze my input completely several times forcing me to switch tty to kill it. Don't ask how many times it took me to figure that out.. In newer synergy there is a setting for limiting clipboard size which I would really appreciate to be added to barrier, thanks!
Author
Owner

@SamantazFox commented on GitHub (Oct 5, 2020):

AFAIK, the clipboard is already "text-only". It is defined as a string in the source code:
https://github.com/debauchee/barrier/blob/master/src/lib/barrier/Clipboard.cpp#L114

Based on my experience using barrier, it seems to copy anything in the clipboard, up to the first NUL character (0x00), which doesn't allow to copy PNGs, for instance.

<!-- gh-comment-id:703830611 --> @SamantazFox commented on GitHub (Oct 5, 2020): AFAIK, the clipboard is already "text-only". It is defined as a `string` in the source code: https://github.com/debauchee/barrier/blob/master/src/lib/barrier/Clipboard.cpp#L114 Based on my experience using barrier, it seems to copy anything in the clipboard, up to the first NUL character (0x00), which doesn't allow to copy PNGs, for instance.
Author
Owner

@zgxsin commented on GitHub (Apr 30, 2021):

AFAIK, the clipboard is already "text-only". It is defined as a string in the source code:
https://github.com/debauchee/barrier/blob/master/src/lib/barrier/Clipboard.cpp#L114

Based on my experience using barrier, it seems to copy anything in the clipboard, up to the first NUL character (0x00), which doesn't allow to copy PNGs, for instance.

Is there any way to enable image-supported clipboard sharing?

<!-- gh-comment-id:829719686 --> @zgxsin commented on GitHub (Apr 30, 2021): > AFAIK, the clipboard is already "text-only". It is defined as a `string` in the source code: > https://github.com/debauchee/barrier/blob/master/src/lib/barrier/Clipboard.cpp#L114 > > Based on my experience using barrier, it seems to copy anything in the clipboard, up to the first NUL character (0x00), which doesn't allow to copy PNGs, for instance. Is there any way to enable image-supported clipboard sharing?
Author
Owner

@jduemes commented on GitHub (Apr 30, 2021):

I would like that barrier had an option for clipboard that could be named: "Only text (no formatting)" or something, Since some application simply do not understand CTRL+Shift+V to paste text without format.

<!-- gh-comment-id:830117718 --> @jduemes commented on GitHub (Apr 30, 2021): I would like that barrier had an option for clipboard that could be named: "Only text (no formatting)" or something, Since some application simply do not understand CTRL+Shift+V to paste text without format.
Author
Owner

@Delwin9999 commented on GitHub (May 26, 2021):

On that same note I've found that copying something out of google docs, switching machines, and pasting it into slack it loses formatting. Doing that on the same machine it keeps formatting.

I'm guessing there's a null character separating text from format in the clipboard? I'll look into this myself but I just wanted to note it here.

<!-- gh-comment-id:848961050 --> @Delwin9999 commented on GitHub (May 26, 2021): On that same note I've found that copying something out of google docs, switching machines, and pasting it into slack it loses formatting. Doing that on the same machine it keeps formatting. I'm guessing there's a null character separating text from format in the clipboard? I'll look into this myself but I just wanted to note it here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#77
No description provided.