-
Notifications
You must be signed in to change notification settings - Fork 822
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
Could not access starting directory \\wsl$\Ubuntu\home error 0x8007010b #6995
Comments
I was able to solve this by going into the windows terminal settings, going to the ubuntu profile, and ticking the "Use parent process directory" box. No idea why that worked. It's also worth noting that this occurred to me right after a reboot. |
Just to reiterate, I was having the same issue. This is specific to terminal right now. Running just |
Perfect, just had the same issue and the above worked for me - either run in cmd prompt or tick the above setting. Lifesaver!! I have several WSL distributions, need to tick this for all of them if using Windows Terminal. Must have been some sneaky stealth update last night? Edit again: This seems to happen if you have a custom startup directory - I did since I don't want to start my Linux in the windows %USERPROFILE% every time. However, If I tick the box, then untick and set the "\\wsl$\Ubuntu\blahblah\home" path to my home directory manually again it all works as before, and I start up in the correct (Linux) home dir. |
Thanks. This worked for me. I added a few lines to my .zshrc/.bashrc that references my %USERPROFILE% variable. If we end up there, navigate to where we want the default to be instead. Replace ~ with your desired start directory.
|
I had the same problem. |
I had the same issue, ticking "Use parent process directory" indeed fixes the described error but starts my shell in
Sets the start dir to my Linux user's home dir |
Thanks a lot, it did work for me. |
Worked for me, but it started me on System32. Went back into settings and unchecked "User parent process directory". Loaded another tab and it is back to working normally as it did previously with the correct profile loaded. |
Just go to Windows Terminal>Settings>Ubuntu and replace the starting directory field with Z:\home\username (replace Z: with whatever drive your WSL is mapped on and username with the relevant username/folder name). |
This one works for me, better to start at home directory. |
I ticked "Use parent process directory" but left command line as Thanks for the info |
Just adding another voice here. Had the same problem and this worked for me. |
Yeah, this worked for me! |
That's very useful, I like this option, rather than setting the path manually. Hopefully the Windows Terminal will allow using linux shortcuts sometime? |
|
If |
The problem seems to be that Windows Terminal is looking for the startup directory while |
From my experience (also Windows Terminal Preview), it seems there was nothing wrong with my original settings, but I needed to delete the custom starting directory, successfully start my WSL instance, close it, then put back the same custom starting directory and it worked again. |
I did too, but once I rebooted my PC the error appeared again. |
This bug show up in my terminal today and fixed then using 'windows terminal' configuration menu and setting the correct path. So mad, how or who did change "path inicial"? Windows Update did this? |
You did, Terminal just ignored you until 1.8. |
I can confirm that the problem also recurs for me when I reboot. This time I solved it by starting wsl from PowerShell in Terminal Preview (it started up in |
This error is related to your If you'd like to start up in WSL paths please use I'll close this issue out as it's an expected behaviour. |
@craigloewen-msft I don't think this should be closed. As far as I know, everyone on this thread has a correctly specified |
You're right @swebs ! My apologies for the comment above and closing this issue out early, I just had a quick call with @DHowett and I can add some clarity here: This error can be caused by two things: An incorrectly formatted This behaviour has only shown up now as the 'on starting directory error' behaviour in Windows Terminal changed in version 1.8. In that version it now fails on start up if the starting-directory fails, rather than putting you in your %USERPROFILE% directory which caused inconsistent start up locations. On the WSL team we'll look into |
I was not happy with Files Explorer (come on, no tabs in 2022?), so I used this replacement: It also allows to work around the "Open in Windows Terminal" problem, because you can supply the actual command. And then you can add:
Which will open Windows Terminal with profile name PowerShell and in the current directory |
I'm from 2022-02-15 - windows 11 . |
This is definitely still an issue on my laptop running Windows 11 Home OS Build 22000.593. Using the workaround specified in #6995 (comment) helps with the issue, but as another poster states breaks the context menu option :( Anything else that can be done? It seems that visiting the Linux directory in file explorer kicks it into working again until rebooting. Really frustrating. |
Ever since the Terminal supports just writing "/home/btbn" into the starting directory field, I didn't have the issue anymore. |
Yeah I tried that as well :/ still no dice for me. Thanks for the suggestion though! |
@BorkforceOne on my side, If my WSL distro is already started (i.e. if I run I also learned that if a service is running in the distro, you can log out and it will stay running in the background. So you can do, from Powershell/Command Prompt: wsl
sudo service cron start
exit and the distro is still running in the background, and my WSL Windows Terminal profile works. So I did the following:
This should work with "Open Windows Terminal here" if your WSL profile is your default profile, and it also makes the "Duplicate tab" command open a new tab in the current directory as long as This is on Windows 1909, Windows Terminal 1.11.3471.0. |
Had the same problem with the "Starting Directory". Reason for it was that I was setting it on a profile which ran |
This is something that will need to be raised with Canonical! Their built-in profile json "fragment" tells us to add it. |
What's the best way to let them know? |
Same problem, W11 Pro - 22H2 hacky fix here, starting in windows user folder Settings> Ubuntu> Command Line Starting directory empty (Use parent process directory) |
That seems unnecessarily complicated. You could also just change it to |
I have similar issue
and it seems like I've read all the thread and I hope I didn't miss any solution cause nothing helps in my case. :(
Every time I reopen Terminal, each tab where I was located inside |
The giveaway here is that the path starts with In your OSC9;9 location report from your PS profile, you should actually use |
You've saved my day! It took me a while, but now my Docker/WSL/Terminal bundle works as (in my opinion) it should. Thanks a lot! |
Happy to help! Let me make sure that we don't have the version in our documentation that is busted. 😁 |
Something else I've noticed when using OSC9 codes is if I was on a WSL shell and ssh somewhere where I've configured my PS to use OSC9 also, is that when I kill Windows Terminal and it comes back, it remembers and it tries to cd into the path that only existed remotely, and so it errors. I guess I need to disable OSC9 on remote shells on my setup. 🤔 |
@Kolobamanacas thanks again for pointing this one out; I fixed our documentation up in MicrosoftDocs/terminal#623 😄 @darkvertex Alas, that's one of the worst parts of this whole "working directory" thing. I wish we could restore remote working directories! |
Yeha, startup directory works till you actually want to access the non-wsl filesystem,
No suggestions actually seem to work here, or anywhere. There are so many threads, and no one in any of them has a solid answer to how to change the startup directory. Just piles of "try this" changes that don't actually work. The docs should really be covering this. |
I also encountered the same problem. How did you finally solve it? |
I installed Ubuntu as the host OS instead of windows, means I don't have to
worry about the problem any more.
…On Mon, 3 Apr 2023, 10:32 ligang, ***@***.***> wrote:
I had the same problem. It seems that the directory path notation has
changed from slash to backslash. Before: //wsl$/linux-distro/home/user
After: \\wsl$\linux-distro\home\user
I also encountered the same problem. How did you finally solve it?
—
Reply to this email directly, view it on GitHub
<#6995 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA4SWMQZBLI3BUVV6ISQVLW7KKLDANCNFSM45SJMOSQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Turns out this breaks launching of the profile. Seems to be this issue: microsoft/WSL#6995
The easiest way is to specify the starting directory using Just open Terminal and define your path: echo cd /your/start/directory > ~/.bashrc Then restart it and ejoy. |
Again, that will completely break the ability to open your terminal in any other starting directory than your homedir. |
i found one way to change starting directory for Ubuntu. first open Json file in settings, and then add this line: "commandline": "wsl.exe --cd C:/Users/yourProfile -d Ubuntu-22.04"
|
Doesn't that again break the ability to "Open Terminal here" from the context menu of directories? |
I had a similar problem. |
Windows Build Number
Version 10.0.19041.985
WSL Version
Kernel Version
5.4.72
Distro Version
20.04
Other Software
Visual Studio Code 1.51.1 connected to Ubuntu
Repro Steps
opening ubuntu on windows terminal preview
Expected Behavior
access to wsl
Actual Behavior
[error 0x8007010b when launching `wsl.exe -d Ubuntu']
Could not access starting directory "//wsl$/Ubuntu/home/SAGRI"
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: