[GH-ISSUE #1517] Copying formatted text between server and client has a bug (Linux-Linux and Windows-Linux) #1149

Open
opened 2026-05-05 07:32:03 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @Rutgervdp on GitHub (Jan 11, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1517

What happened?

Hi, I've been using Barrier for about a year between my main laptop (with Linux and Windows dual boot) and an old laptop (running Lubuntu) that I mostly use as a second screen.

I'm currently working on my thesis, I have documents in Google Docs open on both laptops (notes on the old one, my thesis on the main one), and I often copy text from one screen to the other.

Recently (I can't remember when, exactly), I've been running into the problem that formatted text (with italics or bold etc.) gets corrupted when copying between server and client. When I copy flat text from a text editor like gedit, it's no problem, and when I paste without formatting (Ctrl + Shift + V), it also works, but then I have to redo the formatting.

I've tested the clipboard bug by copying the sentence: "This is a test sentence." from client to server and vice versa, testing with my server laptop running Linux as well as Windows. These were the results:

  • Server (Linux) to client (Linux):
    <�meta charset="utf-8"><�b style="font-weight:normal;" id="docs-internal-guid-714a6228-7fff-0f1a-dfea-e2be6708696e"><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">This is a <�/span><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">test <�/span><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">sentence<�/span><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">.<�/span><�/b>

  • Client (Linux) to server (Linux):
    洼瑥⁡档牡敳㵴產晴㠭㸢戼猠祴敬∽潦瑮眭楥桧㩴潮浲污∻椠㵤搢捯⵳湩整湲污札極ⵤ搶摤戶ㅢ㜭晦ⵦ戸つ㘭㘴ⴱ攱㈲㑤〹昲慡㸢猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥潮浲污昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻吾楨⁳獩愠㰠猯慰㹮猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥瑩污捩昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻琾獥⁴⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〷㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢敳瑮湥散⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〴㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢㰮猯慰㹮⼼㹢

  • Server (Windows) to client (Linux):
    This is a test sentence.

  • Client (Linux) to server (Windows):
    洼瑥⁡档牡敳㵴產晴㠭㸢戼猠祴敬∽潦瑮眭楥桧㩴潮浲污∻椠㵤搢捯⵳湩整湲污札極ⵤ㌵㘴㥦ㄱ㜭晦ⵦ㍤㙤挭挰ⵥ㐹ㄱ捣㜱㤲㝣㸢猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥潮浲污昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻吾楨⁳獩愠㰠猯慰㹮猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥瑩污捩昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻琾獥㱴猯慰㹮猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥潮浲污昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻‾⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〷㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢敳瑮湥散⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〴㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢㰮猯慰㹮⼼㹢

The log doesn't seem to show anything out of the ordinary, I've pasted it in the log output field.

I hope I have provided enough information. If there's anything I can try to change in the settings, or any additional information/testing I could provide, please let me know.

Thank you very much.

Kind regards,
Rutger

P.S. I don't really remember from where I installed Barrier. Is there any way I can check that?

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

No response

What OSes are you seeing the problem on? (Check all that apply)

Linux, Windows

What OS versions are you using?

Ubuntu 20.04 and Windows 10 on server, Lubuntu 20.04 on client.

Relevant log output

[2022-01-11T17:20:08] INFO: screen "inspiron" updated clipboard 0
[2022-01-11T17:20:08] INFO: screen "inspiron" updated clipboard 1
[2022-01-11T17:20:19] INFO: screen "GL553VD" grabbed clipboard 1 from "inspiron"
[2022-01-11T17:20:20] INFO: screen "GL553VD" grabbed clipboard 0 from "inspiron"

Any other information

No response

Originally created by @Rutgervdp on GitHub (Jan 11, 2022). Original GitHub issue: https://github.com/debauchee/barrier/issues/1517 ### What happened? Hi, I've been using Barrier for about a year between my main laptop (with Linux and Windows dual boot) and an old laptop (running Lubuntu) that I mostly use as a second screen. I'm currently working on my thesis, I have documents in Google Docs open on both laptops (notes on the old one, my thesis on the main one), and I often copy text from one screen to the other. Recently (I can't remember when, exactly), I've been running into the problem that formatted text (with italics or bold etc.) gets corrupted when copying between server and client. When I copy flat text from a text editor like gedit, it's no problem, and when I paste without formatting (Ctrl + Shift + V), it also works, but then I have to redo the formatting. I've tested the clipboard bug by copying the sentence: "This is a _test_ **sentence**." from client to server and vice versa, testing with my server laptop running Linux as well as Windows. These were the results: - Server (Linux) to client (Linux): <�meta charset="utf-8"><�b style="font-weight:normal;" id="docs-internal-guid-714a6228-7fff-0f1a-dfea-e2be6708696e"><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">This is a <�/span><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">test <�/span><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">sentence<�/span><�span style="font-size:12pt;font-family:'Times New Roman';color:#000000;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;">.<�/span><�/b> - Client (Linux) to server (Linux): 洼瑥⁡档牡敳㵴產晴㠭㸢戼猠祴敬∽潦瑮眭楥桧㩴潮浲污∻椠㵤搢捯⵳湩整湲污札極ⵤ搶摤戶ㅢ㜭晦ⵦ戸つ㘭㘴ⴱ攱㈲㑤〹昲慡㸢猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥潮浲污昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻吾楨⁳獩愠㰠猯慰㹮猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥瑩污捩昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻琾獥⁴⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〷㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢敳瑮湥散⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〴㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢㰮猯慰㹮⼼㹢 - Server (Windows) to client (Linux): This is a test sentence. - Client (Linux) to server (Windows): 洼瑥⁡档牡敳㵴產晴㠭㸢戼猠祴敬∽潦瑮眭楥桧㩴潮浲污∻椠㵤搢捯⵳湩整湲污札極ⵤ㌵㘴㥦ㄱ㜭晦ⵦ㍤㙤挭挰ⵥ㐹ㄱ捣㜱㤲㝣㸢猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥潮浲污昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻吾楨⁳獩愠㰠猯慰㹮猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥瑩污捩昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻琾獥㱴猯慰㹮猼慰瑳汹㵥昢湯⵴楳敺ㄺ瀲㭴潦瑮昭浡汩㩹吧浩獥丠睥删浯湡㬧潣潬㩲〣〰〰㬰慢正牧畯摮挭汯牯琺慲獮慰敲瑮昻湯⵴敷杩瑨㐺〰昻湯⵴瑳汹㩥潮浲污昻湯⵴慶楲湡㩴潮浲污琻硥⵴敤潣慲楴湯渺湯㭥敶瑲捩污愭楬湧戺獡汥湩㭥桷瑩ⵥ灳捡㩥牰㭥桷瑩ⵥ灳捡㩥牰ⵥ牷灡∻‾⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〷㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢敳瑮湥散⼼灳湡㰾灳湡猠祴敬∽潦瑮猭穩㩥㈱瑰昻湯⵴慦業祬✺楔敭⁳敎⁷潒慭❮挻汯牯⌺〰〰〰戻捡杫潲湵ⵤ潣潬㩲牴湡灳牡湥㭴潦瑮眭楥桧㩴〴㬰潦瑮猭祴敬渺牯慭㭬潦瑮瘭牡慩瑮渺牯慭㭬整瑸搭捥牯瑡潩㩮潮敮瘻牥楴慣⵬污杩㩮慢敳楬敮眻楨整猭慰散瀺敲眻楨整猭慰散瀺敲眭慲㭰㸢㰮猯慰㹮⼼㹢 The log doesn't seem to show anything out of the ordinary, I've pasted it in the log output field. I hope I have provided enough information. If there's anything I can try to change in the settings, or any additional information/testing I could provide, please let me know. Thank you very much. Kind regards, Rutger P.S. I don't really remember from where I installed Barrier. Is there any way I can check that? ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? _No response_ ### What OSes are you seeing the problem on? (Check all that apply) Linux, Windows ### What OS versions are you using? Ubuntu 20.04 and Windows 10 on server, Lubuntu 20.04 on client. ### Relevant log output ```shell [2022-01-11T17:20:08] INFO: screen "inspiron" updated clipboard 0 [2022-01-11T17:20:08] INFO: screen "inspiron" updated clipboard 1 [2022-01-11T17:20:19] INFO: screen "GL553VD" grabbed clipboard 1 from "inspiron" [2022-01-11T17:20:20] INFO: screen "GL553VD" grabbed clipboard 0 from "inspiron" ``` ### Any other information _No response_
Author
Owner

@redsigma commented on GitHub (Jun 29, 2022):

I have this problem as well but i dont know if it is relevant. In my case i am copying plain text from a linux machine (client) to a windows machine (server)

If i paste the text in Microsoft Teams( on windows ) then the text glitches out and shows similar symbols.
However if i paste the text in a browser url ( again on same windows ) then it pastes correctly.

I dont know if this is a problem on microsoft teams side, but currently if i am using microsoft teams, i am forced to paste things in a separate app and copy them from there. This same issue happens with images too, when pasted on microsoft teams.

Version
v2.3.3

Git commit hash
3395cca9

<!-- gh-comment-id:1169697568 --> @redsigma commented on GitHub (Jun 29, 2022): I have this problem as well but i dont know if it is relevant. In my case i am copying **plain** text from a linux machine (client) to a windows machine (server) If i paste the text in Microsoft Teams( on windows ) then the text glitches out and shows similar symbols. However if i paste the text in a browser url ( again on same windows ) then it pastes correctly. I dont know if this is a problem on microsoft teams side, but currently if i am using microsoft teams, i am forced to paste things in a separate app and copy them from there. This same issue happens with images too, when pasted on microsoft teams. Version v2.3.3 Git commit hash 3395cca9
Author
Owner

@javoparada commented on GitHub (Jan 9, 2025):

I have the same problem that @redsigma commented. My solution was to paste the text in Teams directly with Ctrl+Shift+V. Not sure why, but it works.

<!-- gh-comment-id:2579985024 --> @javoparada commented on GitHub (Jan 9, 2025): I have the same problem that @redsigma commented. My solution was to paste the text in Teams directly with Ctrl+Shift+V. Not sure why, but it works.
Author
Owner

@redsigma commented on GitHub (Jan 9, 2025):

I have the same problem that @redsigma commented. My solution was to paste the text in Teams directly with Ctrl+Shift+V. Not sure why, but it works.

Thanks for the info. It seems teams added now a plain paste feature in the dropdown

image

<!-- gh-comment-id:2580041085 --> @redsigma commented on GitHub (Jan 9, 2025): > I have the same problem that @redsigma commented. My solution was to paste the text in Teams directly with Ctrl+Shift+V. Not sure why, but it works. Thanks for the info. It seems teams added now a `plain paste` feature in the dropdown ![image](https://github.com/user-attachments/assets/cbb7cb94-166d-44da-9f5e-237a2fec5d45)
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#1149
No description provided.