hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.65k stars 441 forks source link

Support of multiple X servers #1959

Closed mviereck closed 2 years ago

mviereck commented 2 years ago

Is your feature request related to a problem? Please describe. I am running multiple X servers and would like to share the clipboard across all of them. My feature request is an ability of CopyQ to watch and synchronize the clipboard of multiple X servers at the same time. AFAIK there is no tool around that can do this.

Describe the solution you'd like Ideally I could send CopyQ a command like copyq watch DISPLAY=:10 XAUTHORITY=/path/to/cookie. Additionally a command like copyq unwatch DISPLAY=:10 makes sense. (Note that some X servers can be closed while CopyQ is still running.)

Describe alternatives you've considered Currently I run a loop script with xclip that watches for changes in each X server and, if so, sends the content to the other X servers. This is done for selections clipboard and primary.

Additional context I maintain a project x11docker that allows to run GUI applications in containers using additional X servers like Xephyr. As an optional feature the clipboard between the host X server :0 and the additional/nested X server is shared. With multiple containers multiple X servers are running. I wish to synchronize the clipboards of all X servers in a better way than now.

hluk commented 2 years ago

Sorry, this is not going to happen. The implementation would not be simple and I see this would be useful only for very few users.

As workaround, you can run multiple CopyQ instances with separate sessions or config directories and use Synchronization plugin.

mviereck commented 2 years ago

Thank you! I'll look into this. Just one question: On the first glance the documentation shows only manual configuration with user interaction. Can this be configured by CLI only, too?

hluk commented 2 years ago

Thank you! I'll look into this. Just one question: On the first glance the documentation shows only manual configuration with user interaction. Can this be configured by CLI only, too?

Unfortunately, the synchronization can be configured only in GUI.

mviereck commented 2 years ago

Unfortunately, the synchronization can be configured only in GUI.

Ok. Thank you for the information! Currently I use a combination of an xclip loop with CopyQ, that works fairly well. CopyQ would only need to automatically provide multiple TARGETS (#1960), than my current solution is fine.

mviereck commented 2 years ago

Btw., thank you for CopyQ! It is really cool, I am yet exploring its possibilities.