delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/22/12:22:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=IWj5ymRruKbvpfKV
CWIIvy9BFL4lqqLbBgas2suOnwyPfXimnYzvdLvY8vkaYoAcMiXTcMGEGPGAYgpE
PrtBKwGrodXQXval3CN6L+TdJioXkZEQvZkjNCgntu/L1ws6sMt2PJHu5PXsevvW
uMyN+Pr32JbBJhXp9Uyp3vpHm1w=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=BmlJViZdW+amqElEu+YSeU
Bjgpc=; b=eYyg1ZVzvOrLvUzPDIW6KPXhmZwb/KsoeTvlfgr2+eMAcH9j8jPZs/
diHPvtMPdK7uvjWeusOhutOwLR8npcXQ4upP4uNdhZyNYeIh8CXq/XfeVTPwKG4r
SphuCjmAd+yMvbIRj0NHJONHo6/umN/Gmdod6qChRSRPEyArC2ifw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=controls, quoting, clip, disturbing
X-HELO: smtp-out-no.shaw.ca
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shaw.ca; s=s20180605; t=1566490883; bh=Su1dqCxOALmeL4OgS3rO1mIdLRub12NbMf1htwNoIcA=; h=Reply-To:Subject:To:References:From:Date:In-Reply-To; b=pj7OKOZIerD6ZepnOKVAUtHAmGN2d2ajkaSuRGfdruQ2sgmXBoc8GqdjxzaIswJLf wG4ZK2YnuE2vy9n4vHj8zRm1/Y8mIn7Cjm7nfw0ehb8F5XbhkFPQfyQ3ZHzLqXQcvU euEGZ2L7RcGUqk3KmS/T+uu5c+QkoPvAproIAC7mrR/+ZzW1LH3VQonr+EXhpxif3t 4yOKWb6YbMhZGvhmlLx3G90Qw1hdQLChh5qnArO0IT5D4Sfc5RLGEwowQRBvMsowhN sF/OoZCTJa4tGFu/W8DPqrFdyf8WmX4lCZNhFajvO8lnZ/funxMcQapxkjQit7TSwQ mwGRLPyzqxLPQ==
Reply-To: Brian DOT Inglis AT Shaw DOT ca
Subject: Re: looking for xcb and/or wxcopy?
To: cygwin AT cygwin DOT com
References: <5D5D9DF2 DOT 1050400 AT tlinx DOT org> <c56fa8e5-e5b0-6998-e25b-43ed885a4034 AT t-online DOT de> <5D5E431A DOT 2070902 AT tlinx DOT org>
From: Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>
Openpgp: preference=signencrypt
Message-ID: <471a3016-13a2-cc28-4265-8e2061883f63@Shaw.ca>
Date: Thu, 22 Aug 2019 10:21:22 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <5D5E431A.2070902@tlinx.org>

On 2019-08-22 01:24, L A Walsh wrote:
> On 2019/08/21 15:21, Hans-Bernhard Bröker wrote:
>> So have you run cygcheck on the packages that are supposed to contain
>> them?  "cygcheck -p wxcopy" tells me that the former are part of the
>> WindowMaker package.
>>   
> Yes...but i started with xcb.  When I saw it missing, I didn't bother
> to test the next one
> 
> Not sure where it would have come from  weird.
> Thanks for the clarification!

It doesn't help that now libxcb1 is the "X Protocol C-Language Bindings (core
runtime)".

There is /dev/clipboard and packages xclip, xclipboard, xwinclip.

There are escape sequences you can generate to get/set X term cut buffers; see:

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands

and scroll down to 5 2:

...
Operating System Commands

OSC Ps ; Pt BEL {\E]Ps;Pt\a}

OSC Ps ; Pt ST  {\E]Ps;Pt\E\\ - string terminator used with string data args}
...
            Ps = 5 2  -> Manipulate Selection Data.  These controls may
          be disabled using the allowWindowOps resource.  The parameter
          Pt is parsed as
               Pc ; Pd

{\E]52;Pc;Pd\a}
{\E]52;Pc;Pd\E\\}

          The first, Pc, may contain zero or more characters from the
          set c , p , q , s , 0 , 1 , 2 , 3 , 4 , 5 , 6 , and 7 .  It is
          used to construct a list of selection parameters for clip-
          board, primary, secondary, select, or cut buffers 0 through 7
          respectively, in the order given.  If the parameter is empty,
          xterm uses s 0 , to specify the configurable primary/clipboard
          selection and cut buffer 0.

          The second parameter, Pd, gives the selection data.  Normally
          this is a string encoded in base64 (RFC-4648).  The data
          becomes the new selection, which is then available for pasting
          by other applications.

          If the second parameter is a ? , xterm replies to the host
          with the selection data encoded using the same protocol.  It
          uses the first selection found by asking successively for each
          item from the list of selection parameters.

          If the second parameter is neither a base64 string nor ? ,
          then the selection is cleared.
...

Use the first command format to get the buffer contents, response is the same as
the second command format, which returns the buffer contents in base 64 encoded
format:
	\E]52;[cpqs0-7];?\a
	\E]52;[cpqs0-7];<b64...>\E\\

For security, mintty requires config entry AllowSetSelection=true to enable
this; others may also have added guards.

I have found it useful to wrap these kinds of commands in bash shell functions,
and use bash "read -p prompt [-d delim] [-[nN] nchars] [-t timeout] response"
when there are responses, to send the escape sequence as a prompt, using what
they call ANSI escape quoting $'\...' for the prompt string, and read the
response, decoding it with shell substitutions: ${response#...} ${response%...},
displaying it with cat -A <<< "$response".
If no unique terminator ends the response so you can use the -d delim, you can
use -N n with a large enough size for any likely response (maybe 4K or higher
for buffers) and -t 1 to return the response after a second.
YMMV

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019