DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5ARE5CqF3818640 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5ARE5CqF3818640 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=q1juD99f X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6331D3857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1764252311; bh=Z7vEOJhOHqtLSdZVTFnSFsH6iCobi4P6L6So2jlA7Hw=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=q1juD99fmF9CPXPw5dkZag75/UuBu9sBwsHuSh6ZGjwAhTkmVoAMMZI9GY8YlPHWB UyUtnZbzkJ7EBl7bRVO5ZyWqQJQ9zIIWI9B0n+abIOcqjXo53GNBPd1yfEY5r6gV+g jaw+88uwAMSK4sS1iHuRRlq9NzQOKj4SRB5VW5nQ= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E17E13858C41 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E17E13858C41 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764252279; cv=none; b=aEVbJVrb+Gk9K3cpehQGbdwI0AqdrHP453TLnVG/hZ0fgm6r+chM0cxmGEfaG4GxSbUmtDGbtCpRu9TQ5k8oKeJfA3VeNwzG4dLfYKPTY7IODx+ZTtawO0j2pAJ4y77JsDoqfIDFW0IpaqEPWviTr/jGqSQPfkSdw3qWrsb2+X4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764252279; c=relaxed/simple; bh=J9m6EGSAPUMmk3fRPaBcVIID9D1FiVz2Crk6XxuMSME=; h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature; b=DpbCgTCynAIilIAFcW5n1dKlm3XYzSz1ELpHRMTi34WlRMQ+MGT9F/1H2/lCMocK6eJBKVea9Qd4U6bC+4mbDDx8knpgYhDj3vQ3T7jP6rVWyAvjlpyAR+NjRscjtPO5Itm2MjOfCemyVVeI5vF7cKKBlyN1W4H2W0cZ7E8s92c= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E17E13858C41 Date: Thu, 27 Nov 2025 23:04:36 +0900 To: cygwin AT cygwin DOT com Subject: Re: dynamic conpty loading Message-Id: <20251127230436.92c7d7945dd145a8e40a4d87@nifty.ne.jp> In-Reply-To: <20251127172026.6b6f876fd341f9c0cbd1f876@nifty.ne.jp> References: <30deef29-ba20-49d9-9b38-28020941b0ef AT towo DOT net> <707f4d4c-a20d-4f1d-bdbd-65a2392dea15 AT towo DOT net> <20251121190433 DOT 4a37dc959848a0aea89a8922 AT nifty DOT ne DOT jp> <62f3c1ae-1fd9-477d-a837-d865094dab06 AT towo DOT net> <20251126193220 DOT 1b890f58a121add2f0d05fa5 AT nifty DOT ne DOT jp> <3a6ed5bc-24fd-42b0-9f57-83c8eb678a1b AT towo DOT net> <20251127172026 DOT 6b6f876fd341f9c0cbd1f876 AT nifty DOT ne DOT jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Thu__27_Nov_2025_23_04_36_+0900_wG8ATPzf=3i6.tI3" X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" This is a multi-part message in MIME format. --Multipart=_Thu__27_Nov_2025_23_04_36_+0900_wG8ATPzf=3i6.tI3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 27 Nov 2025 17:20:26 +0900 Takashi Yano wrote: > On Wed, 26 Nov 2025 19:50:07 +0100 > Thomas Wolff wrote: > > > > Am 26.11.2025 um 11:32 schrieb Takashi Yano via Cygwin: > > > On Fri, 21 Nov 2025 17:58:01 +0100 > > > Thomas Wolff wrote: > > > > > >> Am 21.11.2025 um 17:46 schrieb Corinna Vinschen via Cygwin: > > >>> Hi Thomas, > > >>> > > >>> On Nov 21 16:46, Thomas Wolff via Cygwin wrote: > > >>>> Am 21.11.2025 um 11:04 schrieb Takashi Yano via Cygwin: > > >>>>> On Sun, 5 Oct 2025 10:15:55 +0200 > > >>>>> Thomas Wolff wrote: > > >>>>>>>> The procedure seems to be: > > >>>>>>>> try LoadLibrary("conpty.dll"), (if not successful, fallback to > > >>>>>>>> GetModuleHandle("kernel32") instead) to retrieve GetProcAddress for > > >>>>>>>> CreatePseudoConsole, ResizePseudoConsole, ClosePseudoConsole, and > > >>>>>>>> then somehow (?) use those while calling CreateProcess. > > >>>>>>>> The latter is woven into the cygwin library and I don't think it's a > > >>>>>>>> good idea to clone that out of cygwin for a patched process creation > > >>>>>>>> in mintty. > > >>>>>>>> > > >>>>>>>> My question/suggestion: > > >>>>>>>> Can a cygwin mode switch to a selected conpty library instead of the > > >>>>>>>> default one please? > > >>> Where do you expect this conpty.dll to reside? > > >>> > > >>> If we do something like that, I would suggest to make sure that this > > >>> conpty.dll is in a well-defined place. /bin or /lib might be a good > > >>> idea. And if it exists in this defined place, it will be used by Cygwin. > > >>> > > >>> We can tweak the autoload mechanism to allow a primary DLL and a fallback > > >>> DLL, that drops the need to set the CYWIN env var. > > >>> > > >>> The mintty package could contain a post-install script, or some other > > >>> script in /bin to allow a user with admin rights downloading the latest > > >>> (or the most sensible) conpty.dll from MSFT. > > >>> > > >>> Would that make sense? > > >>> > > >>> > > >>> Corinna > > >>> > > >> That makes much sense, yes, thank you. /bin/conpty.dll would probably be > > >> a good place. > > > I checked the source of conpty.dll > > > https://github.com/microsoft/terminal/blob/main/src/winconpty/winconpty.cpp > > > > > > conpty.dll seems to launch OpenConsole.exe in the directory where > > > WindowsTerminal is installed. > > > However, BUILTIN\Users does not have permission to execute OpenConsole.exe. > > > > > > Do you have some idea how to solve this problem? > > > WindowsTerminal itself can launch OpenConsole.exe, so there should be > > > some solutions, I think. > > Did you install the nuget package? It can be extracted with zip, so you > > can install OpenConsole as a normal program... > > I did not find a way, though, to invoke it explicitly so that it would > > solve the pty interworking problems. > > Thanks. > > I've made an experimental patch against fhandler/pty.cc and > draft package named openconsole that installs official OpenConsole.exe > binary into /usr/bin. > > I confirmed the patch with openconsole package enables the mouse > support for vim91 and neovim 0.8.0 (native windows binary) in > pseudo console. > > Any comments and suggestions would be appreciated. openconsole-1.23.12811.0-1.cygwin.patch fixed. -- Takashi Yano --Multipart=_Thu__27_Nov_2025_23_04_36_+0900_wG8ATPzf=3i6.tI3 Content-Type: text/plain; name="openconsole-1.23.12811.0-1.cygwin.patch" Content-Disposition: attachment; filename="openconsole-1.23.12811.0-1.cygwin.patch" Content-Transfer-Encoding: base64 LS0tIG9yaWdzcmMvb3BlbmNvbnNvbGUtMS4yMy4xMjgxMS4wL0NZR1dJTi1QQVRDSEVTL2xpYm9w ZW5jb25zb2xlLnBvc3RpbnN0YWxsCTE5NzAtMDEtMDEgMDk6MDA6MDAuMDAwMDAwMDAwICswOTAw DQorKysgc3JjL29wZW5jb25zb2xlLTEuMjMuMTI4MTEuMC9DWUdXSU4tUEFUQ0hFUy9saWJvcGVu Y29uc29sZS5wb3N0aW5zdGFsbAkyMDI1LTExLTI3IDIzOjAyOjMxLjM1MTkyMTkwMCArMDkwMA0K QEAgLTAsMCArMSwyMCBAQA0KK2lmIFsgJCh1bmFtZS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09wZW5Db25zb2xlLmV4ZQ0KLS0t IG9yaWdzcmMvb3BlbmNvbnNvbGUtMS4yMy4xMjgxMS4wL0NZR1dJTi1QQVRDSEVTL2xpYm9wZW5j b25zb2xlLnByZXJlbW92ZQkxOTcwLTAxLTAxIDA5OjAwOjAwLjAwMDAwMDAwMCArMDkwMA0KKysr IHNyYy9vcGVuY29uc29sZS0xLjIzLjEyODExLjAvQ1lHV0lOLVBBVENIRVMvbGlib3BlbmNvbnNv bGUucHJlcmVtb3ZlCTIwMjUtMTEtMjcgMjM6MDI6MzEuMzUxOTIxOTAwICswOTAwDQpAQCAtMCww ICsxIEBADQorcm0gLWYgL3Vzci9iaW4vT3BlbkNvbnNvbGUuZXhlDQo= --Multipart=_Thu__27_Nov_2025_23_04_36_+0900_wG8ATPzf=3i6.tI3 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple --Multipart=_Thu__27_Nov_2025_23_04_36_+0900_wG8ATPzf=3i6.tI3--