Comments (6)
Thanks for the report. I'd like to clarify/confirm a few things about your setup before moving forward, to make sure I'm going in the right direction. I'll state some assumptions, and please correct anything I have wrong.
I did a quick google search about citrix workspace and it looks like a frontend/client application to access virtual machines. I'll use the word "pc" to refer to the computer where citrix workspace is installed. You use sway for your primary desktop environment on the pc. Within the virtual machine that you access using citrix, you also have linux running with some kind of graphical desktop environment.
You expect that the clipboard on the pc and the clipboard within the vm should be synchronized and have the same contents. This actually works to some extent, because xclip -o in alacritty running inside the vm is able to access the clipboard contents from the pc. But other applications, such as xterm, do not have access to the same clipboard. This is the behavior you see without running clipboard-sync. You tried running clipboard-sync, and it had no effect on the behavior.
questions:
- What desktop environment are you running inside the virtual machine?
- Does citrix workspace claim to support clipboard synchronization on its own, and do you have this enabled?
- Are you running any software within the virtual machine that integrates with citrix?
- Where did you run clipboard sync? The pc or the vm?
from clipboard-sync.
I'm actually using sway on my physical machine, citrix has a windows virtual machine running within it.
When I run xclip -o inside of alacritty on my native sway environment after copying something from the windows virtual machine, it gives the correct output, however wl-paste says it is empty, meaning I cannot paste from the environment, unless I do a hacky workaround.
citrix workspace does support clipboard synchronization, and in fact, if I copy from a text editor running xwayland, and then copy from the virtual machine again, sometimes the clipboard does work properly, I sometimes have to swap between them repeatedly, and that is the only way I have been able to copy from citrix.
As the native sway is the only linux machine between the two, i ran clipboard sync on the native sway machine
Are you running any software within the virtual machine that integrates with citrix?
I don't really understand this question, there's a windows machine within a window that is the citrix workspace, there isn't any software except sway running citrix within it, connected to a windows virtual machine.
I hope this clarifies, although, I think this might be more of a sway/wlroots issue than your problem, I was just hoping that since xclip -o outputs the correct information that this tool would resolve the issue.
edit: I have found a hacky workaround, adding this to sway seems to completely fix the issue
bindsym --release Control+c exec swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true) | .shell' | grep -Eq 'xwayland' && [xclip -o | wl-copy]
further edit: i've found situations where this gets completely ignored, so, it's not a real solution, I currently am having xclip -o output something different from wl-paste even though i've added this command to my bindsyms, UGH.
from clipboard-sync.
I've made a post here for the sway devs swaywm/sway#7958
from clipboard-sync.
Sounds like my initial interpretation was pretty wrong.
In our assessment of clipboard-sync, I think we can ignore citrix workspace (for a moment) and look at the fact that you have two separate clipboards on your linux system with different contents. This is exactly the kind of thing that clipboard-sync is intended to reconcile.
It may be true that citrix or sway could be designed or implemented in a way that prevents this discrepancy from occurring in the first place. I'm not sure if those projects would consider this to be in scope because it means they would need to deal with multiple clipboards. Regardless, I would like clipboard-sync to be able to step in for whatever scenario might trigger a discrepancy like this and synchronize the clipboards.
I'm labeling this as a bug for now because I would have expected clipboard-sync to handle this. I will attempt to reproduce it. My current job has me busy using a macbook, so I'm not using a linux desktop much any more. I'm not sure when I'll get a chance to work on this, but it's high on this project's priority list.
from clipboard-sync.
I'm very happy to hear that, thank you so much!
Let me know if there's anything I can do to help!
from clipboard-sync.
I have discovered something new about the intricacies of this, I decided to try running a VM with i3, thinking that if I have a vm running x.org as an intermediary between citrix and the xwayland clipboard, that might resolve it... what i've discovered is that citrix actually doesn't even write to the clipboard until focus is lost, and on wayland, citrix doesn't have a way of knowing that focus was lost due to the inherent secure nature of the protocol, and that's why i'm able to make it work by rapidly switching between citrix and zim, if I go to my i3 vm, copy something, and switch workspaces back and forth, it works 100% of the time, if I don't switch workspaces back and forth, nothing is copied to the clipboard
This also explains why running xclip -o | wl-copy works from alacritty, because i've moved the focus away from citrix and running the xclip -o tells the x11 server that the focus has been moved, whereas running it as a keybind doesn't do that.
Jesus christ.
from clipboard-sync.
Related Issues (20)
- cli configure logging mode
- publish to crates.io
- sway wlr `get` hangs
- retain data in clipboard from before start HOT 1
- occasionally the clipboard is set to a display number HOT 1
- Makefile instructions for user install
- randomly stops working after a while HOT 1
- fedora/centos package HOT 1
- considers every x11 display to be real HOT 4
- sometimes the clipboard is empty HOT 3
- does not monitor for new clipboards
- standard rust logging
- bad error messages when failure to connect to clipboard
- static linking HOT 1
- package verifications
- clipboard blanking immediately after copy following resume from suspend HOT 1
- error managing child process
- Didn't work with images HOT 4
- add docs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clipboard-sync.