X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=jj
	Icoc3wAZ0ZibJCn98qmMJQiQ0+NZQ1iWU4qhBuXCf+b/KO2yKlB1N1XIV6xbx7GJ
	EpjfoerpXwnuRdoQglEJBl08oMuhiAcVpUfh04JsFF8yQQ5UeFGyOZ25jk+28lHL
	kK2CiYImo5LWSKh0UQ0CaD1ot43CMfB26cIfTygCE=
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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=+iqPR9nB
	RReQdRfeQx8xzRT/7ZE=; b=BfyQFAQaVOmE/7KEdyibaenX1GvgY69VZnzpIyIe
	8F5rUh96LVtjbm8pgZovAR/map1FEqO7agp7FcYxUFItuimORwPwJB6M+qRCS6Um
	Km2CLVpfK18lLZcLDKKkdrW7TVqGs0hp8NoK3Ezg+yQhz8UM3JUvJ71A2+sLW3fX
	viM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-lb0-f182.google.com
MIME-Version: 1.0
X-Received: by 10.152.170.194 with SMTP id ao2mr58709182lac.60.1417456241526; Mon, 01 Dec 2014 09:50:41 -0800 (PST)
In-Reply-To: <1601998502.20141129012136@yandex.ru>
References: <20141110205216.GJ2782@calimero.vinschen.de>	<0B8D23F7-0258-472D-BF38-860402FD3CDC@etr-usa.com>	<20141111101821.GO2782@calimero.vinschen.de>	<loom.20141111T112847-576@post.gmane.org>	<20141111111437.GB28012@calimero.vinschen.de>	<20141126205658.GA9157@calimero.vinschen.de>	<20141127170042.GE3810@calimero.vinschen.de>	<8610043342.20141128150810@yandex.ru>	<20141128124814.GM3810@calimero.vinschen.de>	<5354135.20141128190818@yandex.ru>	<20141128163305.GN3810@calimero.vinschen.de>	<1601998502.20141129012136@yandex.ru>
Date: Mon, 1 Dec 2014 12:50:41 -0500
Message-ID: <CABa6CEkyyae6GGxVSZ6MBP=-d_uq+Uu9qTZEtZfdVHa7KwOs=g@mail.gmail.com>
Subject: Re: RFC: 1.7.33 problem with user's home directory
From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

On Fri, Nov 28, 2014 at 5:21 PM, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
>
>> On Nov 28 19:08, Andrey Repin wrote:
>>> > If we implement the above, we
>>> > would just have to add a cmd wrapper script in /bin to make sure
>>> > $PATH is set correctly and to make sure CMD starts up in $HOME,
>>> > something along the lines of:
>>>
>>> >   $ cat /bin/cmd
>>> >   #!/bin/dash
>>> >   PATH=/bin:$PATH
>>> >   cd $HOME
>>> >   # Don't rely on COMSPEC!
>>> >   cmd=$(cygpath -ua "${SYSTEMROOT}\\System32\\CMD.EXE")
>>> >   exec "${cmd}"
>>>
>>> I hope you don't expect it to work inside mintty.
>
>> Oh, it does.  CMD itself isn't the biggest problem, many other native
>> tools are.
>
> Yes, CMD itself do output... something. As long as encoding isn't an issue.
> But I have PROMPT=%USERNAME%%COMPUTERNAME%. Imagine if one of them turned out
> to contain non-ASCII characters.
>
>>> Cygwin tools may function
>>> properly in this case, but the shell itself - I have my doubts. And other
>>> native tools would certainly have issues with encoding, if not with any output
>>> at all.
>>> Said that, it would need to be a simple .cmd file, so that it'd run in native
>>> console.
>>> Something like
>>>
>>> @ECHO OFF
>>> PATH=%~dp0;%PATH%
>>> START "" /B "%SystemRoot%\System32\cmd.exe" /K
>>> EXIT
>
>> Fine with me, but it also has to cd to %HOME%, which is given in
>> POSIX syntax...
>
> That may be an issue, unless %HOME% is set somewhere else.
> If you have ideas, where to look, I may be able to provide the code to do it.
>

Don't forget that CMD will not create a second connection to a
\\host\share if Cygwin already has one open.

-- 
cyg Simple

--
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

