delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/10/26/12:13:22

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:from:subject:reply-to:to:references:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=VTEp0oxIdgDDcOzm
saRQv8L7theZhzNuAyxwvAsqfcvIpl/6Lxeak1K3p7nyQd3rMJeMK4yZX9t4sha/
kCrGY20bj1zAbKPWrc6uWnj0tvKgnoNLPwVAP+A012/QJUaRJTcl9ScTg6xSdder
ETFerYst/maO8O3Xpq0096nEivQ=
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:from:subject:reply-to:to:references:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=fhl9POfLbU0hVLhMhjAU9m
r0X7U=; b=vs28NwbN41Qi7ucTltrSvFzyZD6SWu/TEw/ZI2oA3TVCEZEI6rbt2u
IYLNChszho7QUgrH0+tECm5yJnB2jSk0jIvWqWgSSj0L//ZYXgGt/GR539NCTjP6
+x4WNOASKJbtncAJ8BTJxY7o0QFn1/FpHhOuFyb1pQ12lLkixPHxo=
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-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
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 <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Subject: Re: Cygwin alongside WSL
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
To: cygwin AT cygwin DOT com
References: <1176637677 DOT 269012 DOT 1508883598594 AT mail DOT libero DOT it> <516a450a-111f-89b7-3f2b-2a092d7f16b1 AT towo DOT net> <17f5f832-800b-949a-7c64-8a3848a8403d AT SystematicSw DOT ab DOT ca> <1004484f-9735-f060-99a0-b9d29fed59fa AT SystematicSw DOT ab DOT ca> <2ce18657-808a-3e1f-9c59-46f5b8e1128d AT towo DOT net>
Message-ID: <f0180168-fc3b-7a6a-d4b4-14e6a6da2c0d@SystematicSw.ab.ca>
Date: Thu, 26 Oct 2017 10:13:05 -0600
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>
X-CMAE-Envelope: MS4wfPSMqmBWex7EtVea8NntulozgrxCNbkyg1WgsZ0tBcEGAvS12QViYEkRIy/XmLn2f+tLP+3FZwzjtb+U4a+u9o/lGedbuLwIH/eExoUMJ3HbszXg9cz8 5i/d3wlHDNX7AlDTEWJXXSPXN0uGmmIaqK6cYfvppvvzEc/6LPezlIXntsVGFXeCKDTgKB5vU1XcMQ==
X-IsSubscribed: yes

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

- Raw text -


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