From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27606 invoked by alias); 26 Oct 2017 16:57:21 -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 27597 invoked by uid 89); 26 Oct 2017 16:57:21 -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, 25102017, 25.10.2017 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:57:20 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with SMTP id 7lT3eYtIuM9gt7lT4eR2mR; Thu, 26 Oct 2017 10:57:18 -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=FGf_nUcv__1N1b4BcbsA:9 a=pILNOxqGKmIA:10 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: Cygwin alongside WSL 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> From: Brian Inglis Message-ID: <131843e7-1ee5-f9fc-8d75-2767172a51f2@SystematicSw.ab.ca> Date: Thu, 26 Oct 2017 16:57: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: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfGHha6nE7LoMPv5TZJ3h90xrvL9n86KMtxgokqY/Q26eKIy04s5VNhARdoB2GCELx2y49oiIrqBXTrSVCC0UXGHyNGiuxkN2IDrpoPkW4yug7cP0GwmE baKKU0QT7mjq08wVStJXeWB1GgdPDwuvS8RfWA1JPugVZyOuj51BpZauWBltUz55kTtTn4UltvRcbw== X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00339.txt.bz2 On 2017-10-26 10:13, Brian Inglis wrote: > 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. (in getlxssinfo and getlxssdistinfo) > 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