This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: RFC: 1.7.33 problem with user's home directory
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Corinna Vinschen <cygwin at cygwin dot com>, cygwin at cygwin dot com
- Date: Sat, 29 Nov 2014 01:21:36 +0300
- Subject: Re: RFC: 1.7.33 problem with user's home directory
- Authentication-results: sourceware.org; auth=none
- References: <20141110205216 dot GJ2782 at calimero dot vinschen dot de> <0B8D23F7-0258-472D-BF38-860402FD3CDC at etr-usa dot com> <20141111101821 dot GO2782 at calimero dot vinschen dot de> <loom dot 20141111T112847-576 at post dot gmane dot org> <20141111111437 dot GB28012 at calimero dot vinschen dot de> <20141126205658 dot GA9157 at calimero dot vinschen dot de> <20141127170042 dot GE3810 at calimero dot vinschen dot de> <8610043342 dot 20141128150810 at yandex dot ru> <20141128124814 dot GM3810 at calimero dot vinschen dot de> <5354135 dot 20141128190818 at yandex dot ru> <20141128163305 dot GN3810 at calimero dot vinschen dot de>
- Reply-to: cygwin at cygwin dot com
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.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 29.11.2014, <01:17>
Sorry for my terrible english...
--
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