Thanks for the detailed explanation.
For my use of x2go, I need both clipboards to work correctly.
I will try to find time to test your new version. A few questions:
I'm guessing I will need to clone your branch and build the new version from source? No binary builds available?
Are your changes related to the Linux side only? No changes on the Windows end?
Norm
On 10/29/2020 2:05 AM, Ulrich Sibiller wrote:
Well, in X11 (and therefore x2go resp. NX) there two clipboards, PRIMARY and CLIPBOARD. PRIMARY is the one that gets used when you mark some text and paste it with the middle mouse button. CLIPBOARD is the one that gets used by explicitly issuing a "copy" or "paste" command, e.g. in the menu of konsole.
In Windows we only have one clipboard which works like the aforementioned clipboard.
In order to have both X11 clipboards on windows vcxsrv offers to join them. That means whenever a PRIMARY or CLIPBOARD action is done within x2go the data will end up in the windows clipboard. Vice versa everything you copy to the clipboard in windows will end up in BOTH clipboards on the x2go side.
As NX was buggy it could not handle simultaneous requests for both clipboard types correctly and would either mix them up or get stuck. I have identified that problem and rewrote that part of the code in my two branches I mentioned yesterday. But you can also prevent that from happening by switching off vcxsrv behaviour of merging the clipboards. That way the mixup will also not happen. However, you lose the ability to get the PRIMARY content to windows, you will always have to explicitly copy to the clipboard as described above.
Uli
On Thu, Oct 29, 2020 at 12:21 AM Norm Green <norm.green@gemtalksystems.com> wrote:
Thanks for the info.
Can you please explain what noclipboardprimary will do? I read the link at github and it's not clear to me what effect this will have.
Norm
On 10/28/2020 2:36 PM, Ulrich Sibiller wrote:
Hi Norm,
please try the current clipboard development tree: https://github.com/uli42/nx-libs/tree/pr/many_clipboard_fixes
Or this one, which has less fixes than the one above but has been tested more: https://github.com/uli42/nx-libs/tree/pr/clipboard_gathering2020 Clicked "Send" too quickly: You can also disable primary being mapped to windows clipboard in vcxsrv settings. There are two options doing
On Wed, Oct 28, 2020 at 10:27 PM Ulrich Sibiller <uli42@gmx.de> wrote: the same, I suggest to add them both (@Stefan: which one did you test and suggest to your customers?):
-[no]clipboardprimary [Do not] map the PRIMARY selection to the windows clipboard. The CLIPBOARD selection is always mapped if -clipboard is enabled. Default is mapped.
-[no]primary When clipboard integration is enabled, map the X11 PRIMARY selection to the Windows clipboard. Default is enabled.
(from https://gist.github.com/ctaggart/68ead4d0d942b240061086f4ba587f5f)
Uli
Uli
On Wed, Oct 28, 2020 at 10:09 PM Norm Green <norm.green@gemtalksystems.com> wrote:
Copying from Windows (Thunderbird), attempting to paste into Linux x2go session (xemacs).
Here's the clipboard status dump:
/----- Clipboard internal status ----- current time (Time) [1896297037] agentClipboardInitialized (Bool) [True] clientAccum (int) [0] nxagentMaxSelections (int) [2] NumCurrentSelections (int) [9] serverWindow (Window) [0x20064b] nxagentLastClipboardClient (int) [-1] Clipboard mode [Both] lastServer lastServerRequestor (Window) [0x0] lastServerProperty (Atom) [ 334][NX_CUT_BUFFER_SERVER] lastServerTarget (Atom) [ 241][UTF8_STRING] lastServerTime (Time) [1896157976] lastClient lastClientWindowPtr (WindowPtr) - lastClientClientPtr (ClientPtr) (null) lastClientRequestor (Window) [0x0] lastClientProperty (Atom) [ 0][(null)] lastClientSelection (Atom) [ 0][(null)] lastClientTarget (Atom) [ 0][(null)] lastClientTime (Time) [0] lastClientReqTime (Time) [0] lastClientPropertySize (unsigned long) [0] lastClientStage (ClientSelectionStage) [0][None] PRIMARY owner is inside nxagent? yes lastSelectionOwner[].client [17] (addr [0x55ca7a3b7460] PID [22152] Cmd [xfce4-terminal]) lastSelectionOwner[].window [0x2200495] lastSelectionOwner[].windowPtr [0x55ca7b717720] ([0x2200495] lastSelectionOwner[].lastTimeChanged [1896275867] lastSelectionOwner[].selection [ 1][PRIMARY] (inside nxagent) CurrentSelections[].client [0x55ca7a3b7460] index [17] PID [22152] Cmd [xfce4-terminal] CurrentSelections[].window [0x2200495] CLIPBOARD owner is inside nxagent? yes lastSelectionOwner[].client [17] (addr [0x55ca7a3b7460] PID [22152] Cmd [xfce4-terminal]) lastSelectionOwner[].window [0x2200495] lastSelectionOwner[].windowPtr [0x55ca7b717720] ([0x2200495] lastSelectionOwner[].lastTimeChanged [1896275869] lastSelectionOwner[].selection [ 326][CLIPBOARD] (inside nxagent) CurrentSelections[].client [0x55ca7a3b7460] index [17] PID [22152] Cmd [xfce4-terminal] CurrentSelections[].window [0x2200495] Atoms (remote X server) serverTARGETS [ 329][TARGETS] serverTIMESTAMP [ 338][TIMESTAMP] serverTEXT [ 335][TEXT] serverCOMPOUND_TEXT [ 328][COMPOUND_TEXT] serverUTF8_STRING [ 241][UTF8_STRING] serverTransToAgentProperty [ 339][NX_CUT_BUFFER_SERVER] serverTransFromAgentProperty [ 334][NX_SELTRANS_FROM_AGENT] serverLastRequestedSelection [ 1][PRIMARY] Atoms (inside nxagent) clientTARGETS [ 75][TARGETS] clientTIMESTAMP [ 80][TIMESTAMP] clientTEXT [ 76][TEXT] clientCOMPOUND_TEXT [ 85][COMPOUND_TEXT] clientUTF8_STRING [ 81][UTF8_STRING] clientCLIPBOARD [ 79][CLIPBOARD] clientCutProperty [ 261][NX_CUT_BUFFER_CLIENT] \------------------------------------------------------------------------------
x2go-user mailing list x2go-user@lists.x2go.org https://lists.x2go.org/listinfo/x2go-user