我有一个主用户:username1,X是在此用户下运行的。我还有另一个用户账户,在其中进行许多工作:username2。
我如何做到可以将来自username2的命令输出复制到username1的剪贴板中。
Here is an example of it failing:
username2 $ echo "hello" |xclip
No protocol specified
Error: Can't open display: :0
Looking online, I found I should change the DISPLAY variable.
Here is what I get after making that change:
username2 $ echo "hello" |xclip
Error: Can't open display: myws:0
当我进行搜索时,我发现可能需要处理我的.Xauthority文件;但是我对此不熟悉。我将继续查阅文档。
如有任何建议,将不胜感激。