From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33200 invoked by alias); 26 Oct 2017 16:13:10 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 33189 invoked by uid 89); 26 Oct 2017 16:13:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=graziosi, Graziosi, 25.10.2017, 25102017 X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Oct 2017 16:13:08 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with SMTP id 7kmHeYdpRM9gt7kmIeQqIx; Thu, 26 Oct 2017 10:13:07 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=N659UExz7-8A:10 a=fBi4-OniRqb1EuZQuiEA:9 a=pILNOxqGKmIA:10 From: Brian Inglis Subject: Re: Cygwin alongside WSL Reply-To: Brian.Inglis@SystematicSw.ab.ca To: cygwin@cygwin.com References: <1176637677.269012.1508883598594@mail.libero.it> <516a450a-111f-89b7-3f2b-2a092d7f16b1@towo.net> <17f5f832-800b-949a-7c64-8a3848a8403d@SystematicSw.ab.ca> <1004484f-9735-f060-99a0-b9d29fed59fa@SystematicSw.ab.ca> <2ce18657-808a-3e1f-9c59-46f5b8e1128d@towo.net> Message-ID: Date: Thu, 26 Oct 2017 16:13:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <2ce18657-808a-3e1f-9c59-46f5b8e1128d@towo.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfPSMqmBWex7EtVea8NntulozgrxCNbkyg1WgsZ0tBcEGAvS12QViYEkRIy/XmLn2f+tLP+3FZwzjtb+U4a+u9o/lGedbuLwIH/eExoUMJ3HbszXg9cz8 5i/d3wlHDNX7AlDTEWJXXSPXN0uGmmIaqK6cYfvppvvzEc/6LPezlIXntsVGFXeCKDTgKB5vU1XcMQ== X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00336.txt.bz2 On 2017-10-25 15:18, Thomas Wolff wrote: > Am 25.10.2017 um 20:30 schrieb Brian Inglis: >> On 2017-10-25 11:27, Brian Inglis wrote: >>> On 2017-10-25 00:29, Thomas Wolff wrote: >>>> Am 25.10.2017 um 00:19 schrieb Angelo Graziosi: >>>>> Thomas Wolff wrote: >>>>>> Mintty 2.8.0 simplifies WSL integration a lot. >>>>>> In Cygwin, you can simply start e.g. mintty --WSL=Ubuntu (add -~ to start in >>>>>> the WSL home). >>>>> Does it mean that 2.8.0 does not need wslbridge [*] any more? >>>> No, sorry, I forgot to mention that wslbridge would have to be installed >>>> in /bin to make this work. >>> As it is not a Cygwin package, I have installed wslbridge in /usr/local/bin/, >>> which is in the system Path in Windows format, so also in the Cygwin path in >>> Unix format - will this work? >> Would a symlink, winsymlink, or .lnk as /bin/wslbridge to /usr/local/bin/? > Why don't you just try it? Both wslbridge and wslbridge-backend must reside in > /bin, hard links will work of course. It looks like without the Fall Update --WSL= does not work with either no/default distribution found, and the same result with a variety of obvious names: $ mintty --WSL Option '--WSL' requires an argument $ mintty --WSL= WSL distribution '' not found Try '--help' for more information $ mintty --version mintty 2.8.0 (x86_64-pc-cygwin) © 2013/2017 Andy Koppe / Thomas Wolff License GPLv3+: GNU GPL version 3 or later There is no warranty, to the extent permitted by law. $ uname -srvmo CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin but --help does not even mention --WSL=, and the man page mentions wslconfig which is not installed on the system. On a legacy install, the only reg values available are: $ ls -FR /proc/registry/HKEY_CURRENT_USER/SOFTWARE/Microsoft/Windows/CurrentVersion/Lxss/ /proc/registry/HKEY_CURRENT_USER/SOFTWARE/Microsoft/Windows/CurrentVersion/Lxss/: DefaultGid DefaultUid DefaultUsername State $ regtool -lpv list \\HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss DefaultUsername (REG_SZ) = "..." DefaultUid (REG_DWORD) = 0x000003e8 (1000) DefaultGid (REG_DWORD) = 0x000003e8 (1000) State (REG_DWORD) = 0x00000001 (1) It would be nice if --WSL did the right thing for legacy installs also. The problem seems to be in winmain.c on a legacy install, there is no guid, and no BasePath, so you return false. If the distro name wslname is null or empty, or no DefaultDistribution, distribution subkeys, guid, BasePath, or PackageFamilyName, you should take the else legacy path, and fake the guid, fake the BasePath variable bp to W("%LOCALAPPDATA%\\lxss") and PackageFamilyName variable pn to Bash, and maybe also the distro and wslname to Bash. Also for longopts --WSL should allow an optional_argument, as there should be no distinction between --WSL and --WSL=, they should be parsed as if they were --WSL[[ =][distro]], and optional arguments omitted either way, with following options also terminating the argument scan. I can raise these as issues on github if you prefer to track there? -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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