public inbox for
help / color / mirror / Atom feed
From: Jon TURNEY <>
Subject: Re: Help porting the XLaunch feature to autoselect the display number
Date: Tue, 24 Feb 2015 14:59:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 24/02/2015 03:57, Michael DePaulo wrote:
> I am trying to port this feature of VcXsrv (and XMing also I think) to
> Cygwin XLaunch:
> Attached is my WIP patch. (I know it needs the comments updated for
> There's a bug in that is causing this to happen when -1 is specified:

Protip: Ctrl-c works on MessageBox dialogs to copy their contents.

Thanks for looking into this.

Unfortunately, this turns into a non-trivial amount of work.

The upstream design is that -displayfd introduces a file descriptor that 
the child X server process inherits, to which it will write it's display 

(This fd will be one end of a pipe which the parent process has opened, 
and it will read the display number from the fd for the other end)

In the VcXsrv implementation, instead a handle to some shared memory is 
used to pass the display number back. (I guess a Windows anonymous pipe 
would have worked just as well, but possibly this is simpler to implement).

So, you will need to re-write the changes to to create a pipe 
(using pipe()), pass the write fd using -displayfd, and read the diplay 
number from the read fd.

Even after you've done this, I'm not 100% sure that cygwin pipes are 
successfully propagated across CreateProcess().  I have a vague memory 
this is where I got stuck when I last looked at this, but I'm not sure 
I'd noticed that CreateProcess() is being invoked with 

I found my old (non-working) attempt at implementing this [1], which 
might help you a bit.


Volunteer Cygwin/X X Server maintainer

Unsubscribe info:
Problem reports:

      reply	other threads:[~2015-02-24 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  3:57 Michael DePaulo
2015-02-24 14:59 ` Jon TURNEY [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).