-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not execute the .profile file #56
Comments
Do you use the initial Ubuntu on Windows installation or the newer one, installed from the Windows store? |
I installed wsl from Windows store.@mintty |
@rprichard, from my tests I have the impression that the wslbridge parameter |
I just tested FWIW: wslbridge doesn't start a bash login shell by default, but it looks like MS's I looked at the shortcuts created after installing wsltty 1.7.9, and I saw these command lines:
Bash will only source the profile/login scripts with wsltty's -l shortcut. wslbridge will change to the WSL home directory for only the ~ shortcut. Suggestion: maybe all the shortcuts should use |
My confusion, sorry. -C~ is not supposed to invoke a login shell, nor are two of the three WSL shortcuts. This was designed on purpose to match the default behaviour of the original "Bash on Windows" WSL which did not invoke a login shell either. Now it seems that for the Ubuntu store WSL, the Windows bash.exe launcher seems to invoke a login shell. Hmm, not sure, what that means for the shortcut parameters that should be used. Is it dependent on the distribution; could it again be different for a different one; is it true at all? (to be checked) |
@mintty ,I used the shortcut in Start Menu. |
Obviously the bash.exe Windows launcher changed behaviour from the Legacy version (where it did not start a login shell as far as I remember), now it starts a login shell (as @rprichard already noted), so wsltty should change that. |
@mintty At the least, wslbridge should default to invoking bash as |
I see no need to set an arbitrary $0. There should rather be a login option that applies the traditional Unix way, by prepending '-' to the invoked program name (basename) as $0. And I would not make it the default, to stay flexible and be consistent with other programs. |
Released 1.8.0 which does not request a particular shell anymore, so it does not manipulate the startup sequence. |
I don't understand the solution to this ticket. The "Target" of the shortcut currently looks like this:
What am I supposed to change it to, so that I get a login shell? |
You could add an explicit invocation |
@mintty Where would I add the invocation? I tried to append |
Hmm. Apparently while optimizing the launch to need fewer parameters and support login mode (if available), the option to use the full invocation form was lost, sorry. |
Actually, it now works without referring to /bin/wslbridge explicitly: |
Released 3.1.0. |
if I use bash.exe from powershell,it will excute the .profile(I have added "umask 022" line)
but if use wsltty to launch wsl,it won't excute the .profile,like this:
sorry for my bad english
The text was updated successfully, but these errors were encountered: