On Wed, Nov 13, 2013 at 3:53 PM, Alexpux <alex...@gmail.com> wrote:

>
> 14 нояб. 2013 г., в 0:48, Jon <jon.for...@gmail.com> написал(а):
>
>
> On Wed, Nov 13, 2013 at 3:36 PM, Alexpux <alex...@gmail.com> wrote:
>
>>
>> 14 нояб. 2013 г., в 0:31, Jon <jon.for...@gmail.com> написал(а):
>>
>> I'm an old cygwin user who went astray years ago and would like to
>> confirm my MSYS2 setup.
>>
>> Here's what I'm doing to have a sandboxed style setup that isolates my
>> normal windows setup. For example, I don't want MSYS2's default
>> /etc/profile to think HOME is C:\Users\Jon. I want it to think HOME is
>> %MSYS_INSTALL_DIR%/home/Jon and use/modify files in that location.
>>
>> 1) Create a desktop shortcut with
>>
>>  C:\Windows\System32\cmd.exe /e:on /v:on /k C:\Apps\msys32\msys2_shell.bat
>>
>>
>> 2) Modify MSYS2's msys2_shell.bat to include
>>
>> set HOME=%~dp0home\Jon
>>
>>
>> You don’t need it.
>>
>>
>>
>> 3) Place the mingw-w64 official toolchain in C:\Apps\DevTools\mingw
>> (actually it's a windows directory symlink to
>> C:\Apps\DevTools\toolchains\mingwbuilds-64-4.8.2)
>>
>>
>> 4) Update /etc/fstab to include
>>
>> C:/Apps/DevTools/mingw /usr/local/mingw
>>
>>
>> It seems to be OK, but there's one oddity I've found so far. When I use
>> the shortcut, I'm dumped in `~` which pwd's to /usr/home/Jon. When I `cd ~`
>> I'm told I'm in /home/Jon and pwd shows the same thing. Also, my
>> /etc/passwd entry shows /home/Jon.
>>
>> I suspect this is just cygwin's aliasing magic making things nicer for
>> me. But I want to check that my HOME update in msys2_shell.bat should be OK.
>>
>>
>> You have HOME=/home/user by default without needed any changes.
>>
>> *$ echo $HOME*
>> */home/alexey*
>>
>>
>>
> Not in my case, and the default hammers my existing
> %HOMEPATH%%HOMEDIR%/.bash_history.
>
> Perhaps I have something else clobbering the setup?
>
> Jon@Black ~
> $ pwd
> /c/Users/Jon
>
> Jon@Black ~
> $ cd $HOME
>
> Jon@Black ~
> $ pwd
> /c/Users/Jon
>
> Jon@Black ~
> $ echo $HOME
> /c/Users/Jon
>
> Jon@Black ~
> $ cd ~
>
> Jon@Black /home/Jon
> $ pwd
> /home/Jon
>
>
>
>
Probably you have %HOME% variable in system environment.
>
>
Facepalm. Thought I checked that.

C:\>set H
HOME=C:\Users\Jon
HOMEDRIVE=C:
HOMEPATH=\Users\Jon

Sorry for the noise Alexey :(
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to