Skip to content
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

wslpath command does not return the windows path for home directory #3146

Closed
mmktomato opened this issue May 4, 2018 · 10 comments
Closed

wslpath command does not return the windows path for home directory #3146

mmktomato opened this issue May 4, 2018 · 10 comments
Labels

Comments

@mmktomato
Copy link

@mmktomato mmktomato commented May 4, 2018

$ wslpath -w ~
wslpath: /path/to/home: Result not representable

Is this intended behavior? I expect following result:

$ wslpath -w ~
C:\Users\mkt\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\path\to\home

env

>ver

Microsoft Windows [Version 10.0.17134.1]
@0xbadfca11
Copy link

@0xbadfca11 0xbadfca11 commented May 5, 2018

WSL team says don't modify Linux files from Windows applications.
So I think that wslpath does not provide path conversion except /mnt for Windows applications interoperability.
If provided, will helps modify Linux files from Windows applications.

@mmktomato
Copy link
Author

@mmktomato mmktomato commented May 9, 2018

Ah~~~ I forgot the prerequisite.
I want to run like:

$ AutoHotkey64.exe $(wslpath -w ~/dotfiles/ImDisable.ahk)

This is completely read only.
I hope wslpath resolves paths other than /mnt.

@benhillis
Copy link
Member

@benhillis benhillis commented May 10, 2018

This is by-design for now. Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot.

@benhillis benhillis added the bydesign label May 10, 2018
@mmktomato
Copy link
Author

@mmktomato mmktomato commented May 11, 2018

I see. I understand my demand is potentially dangerous.

@mmktomato mmktomato closed this May 11, 2018
@espoelstra
Copy link

@espoelstra espoelstra commented Sep 12, 2018

You may be able to work around this using https://brianketelsen.com/going-overboard-with-wsl-metadata/ if you read the post and pay special attention to the "Update" section at the end.

@nic-hartley
Copy link

@nic-hartley nic-hartley commented Nov 8, 2018

@benhillis That's what --force and a warning is for. rm --no-preserve-root -rf / doesn't say Result not representable. Sometimes you want to do "stupid" things.

@pkruk2
Copy link

@pkruk2 pkruk2 commented Mar 12, 2019

@benhillis

I wanted to save ssh key generated with putty into ~/.ssh. Is it safe or is it not safe as per "Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot." ?

If it is safe, how can I know where is the ~/.ssh located? (from Windows perspective)

@shogerr
Copy link

@shogerr shogerr commented May 14, 2019

This is by-design for now. Since modifying files inside your Linux file system can cause issues, we do not want to make it easier for users to shoot themselves in the foot.

Microsoft, you are certainly hell bent on destroying everything about Linux that makes Linux Linux, aren't you?

Did you consider that you don't need to hand hold people at every turn, and that maybe treating your users like incompetent children frustrates the users you are trying to attract from the Linux world more than anything?

@pkruk2
Copy link

@pkruk2 pkruk2 commented May 15, 2019

There's more details about this in https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/

I think MS said they are going to lift this limitation in future Windows update.

@ivictbor
Copy link

@ivictbor ivictbor commented Jul 19, 2020

WSL team says don't modify Linux files from Windows applications.
So I think that wslpath does not provide path conversion except /mnt for Windows applications interoperability.
If provided, will helps modify Linux files from Windows applications.

But still, this is not cool, I just want to open folder with virtualenv sources in windows, not to edit, but to open it in IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants