[Solved] startxwin and .bashrc problem

On my old computer I always used "startxwin.bat". This worked well and when it was executed an xterm window would open and the .bashrc file in my /home/username/ folder had been read correctly and all of my aliases worked. However with the newest version of Cygwin I noticed that startxwin.bat is replaced with startxwin.exe. I am using the same aliases in the .bashrc file, however when I execute:

C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe

an xterm window opens, but it is obvious the .bashrc file has not been read. I can then type "source .bashrc" and it is read and everything works as before. I have no .startxwinrc file, but I have experimented around by adding one and that doesn't fix the problem either. Thanks for any suggestions.

BTW, my user ID is not in etc/passwd, but I run the above command inside a .bat file that has

@echo off

C:
chdir C:\cygwin\bin
set HOME=\cygwin\home\y2f

I can also check the environment variables and they are set correctly ($HOME for example)

What was in your startxwin.bat ?

I finally found the problem. Here we have to install software as Administrator and then use them with our regular user accounts. When I ran that .bat file as Administrator the .bashrc file was read and everything worked. So I just temporarily gave my regular user account admin privileges and re-installed Cygwin and this fixed my problem. So it turned out to not be a problem with Cygwin at all. Thanks.

Nice to let us know you solved your problem, thanks!

All the best