Answering to myself as I have clarified a couple of points:
1) concerning the window aspect when I launch mintty, the thing is that
I get the mintty window as if mintty was launched with Alt+R. So I
need to reconfigure the font size with the mintty context menu, not
the cmd.exe start window context menu. For the window title, it was
just a matter of adding -T "%CONTITLE%" to the list of arguments of
mintty in msys2_shell.cmd script.
2) Concerning the environment inheritance, I still have no explanation,
however, please note that I wrote something false in my previous
email, when I launch mintty from the vbscript using the
Shell.Application COM with runas operation, the user is no longer me,
but the adminstrator user, that is to say the ~ directory is changed.
Vincent.
Le 13/08/2017 à 23:01, Vincent Belaïche a écrit :
> Hello David,
>
> I tried to enable the symlinks by the following edits :
>
> 1) uncomment set MSYS=winsymlinks:nativestrict from msys2_shell.cmd
>
> 2) Follow instructions in
> https://github.com/git-for-windows/git/wiki/Symbolic-Links to that
extent
> ``Launch gpedit.msc, navigate to Computer configuration - Windows
> Setting - Security Settings - Local Policies - User Rights Assignment
> and add the account(s) to the list named Create symbolic links.''. Of
> course I launched gpedit.msc as Administrator to do that.
>
> 3) modify msys2_shell.cmd so that the terminal is opened with UAC
> elevation : in a nutshell, when MSYS2 has winsymlinks:nativestrict,
> instead of using ``start'' internal command to launch the terminal,
> it launches a VBscript that instantiate a Shell.Application COM to
> launch the terminal with "runas" operation, ie UAC elevation while
> keeping the same user.
>
> When I do these 3 things, I observe the following things:
>
> 1) First there seems to be something broken in the environment
> inheritance. I inherit my MSWindows PATH variable, it is not replaced
> by the MSYS2 default one, and if I close all the bash terminals and
> comment again set MSYS=winsymlinks:nativestrict, that does not solve
> this. It is quite annoying, because diff and find utils are no longer
> found at the correct place.
>
> 2) Second, the terminal window size and font size are no longer the last
> one used, but the system default --- no surprise about that, I need
> to make my VBScript launcher a little more elaborated.
>
> 3) Third, and that is the point, ln -s does not work as expected if it
> was doing real symlinks. It is still faking. If I launch this script
> (I need the full path for diff.exe because of issue #1):
>
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> #! /usr/bin/bash
>
> cd /tmp
> file1=$(mktemp ./test_symlinks.XXXXXXXXXX)
> echo "A first content" > $file1
>
> file2=$(mktemp ./test_symlinks.XXXXXXXXXX)
> rm -f $file2
> ln -s $file1 $(basename $file2)
>
> echo "A second content" >> $file1
>
> echo "== Here is file1 ===="
> cat $file1
> echo "====================="
>
> echo "== Here is file2 ===="
> cat $file2
> echo "====================="
>
>
> if /c/Nos_Programmes/msys64/usr/bin/diff.exe -q -s $file1 $file2; then
> echo "Symlinks are working well";
> else
> echo "Symlinks DON'T work";
> fi
>
> # un peu de ménage
> rm -f $file1 $file2
> --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8----
>
> then I get this output:
>
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> == Here is file1 ====
> A first content
> A second content
> =====================
> == Here is file2 ====
> A first content
> =====================
> Files ./test_symlinks.nBMZiODcch and ./test_symlinks.AECWQriGFm differ
> Symlinks DON'T work
> --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8----
>
> However, there seems to be a change with the ln -s ../* . test. For
> remainder this test is as follows:
>
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> #! /bin/bash
>
> mkdir foo
> cd foo
> echo "Hello" > bar
> mkdir gnats
> cd gnats
> ln -s ../* .
> --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8----
>
> Before uncommenting the `set MSYS=winsymlinks:nativestrict' line, I
> got an error telling something like "too long path" which is
> consistent with doing infinite loop copies recursively. Now, I get
> this error:
>
> --8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
> ln -s ../* .
> /bin/ln: creating symbolic link `./gnats' to `../gnats': No such file
or directory
>
> --8<----8<----8<----8<----8<-- end -->8---->8---->8---->8---->8----
>
> Vincent.
>
>
> Le 11/08/2017 à 13:13, Vincent Belaïche a écrit :
>>
>>
>> Le 11/08/2017 à 10:26, David Macek a écrit :
[...]
>>>>>
>>>>> That doesn't help much IMO. The copy (the fake symlink) is not
>>>>> complete, so it's still a failure.
>>>>>
[...]
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel
antivirus Avast.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users