WhitewaterFoundry / Fedora-Remix-for-WSL

Fedora Remix for Windows Subsystem for Linux.
Other
698 stars 51 forks source link

Ability to set wslpath prior to launching Fedora Remix #86

Open cphenry opened 3 years ago

cphenry commented 3 years ago

Is your feature request related to a problem? Please describe. I'm looking for a way to set my WIN_HOME in my Fedora Remix WSL2 installation. I found /etc/profile.d/00-remix.sh where this variable appears to be set. It looks like it's using the HOMEDRIVE and HOMEPATH variables to set it. Unfortunately my HOMEDRIVE is set to a remote share and I am unable to change it. I edited 00-remix.sh in WSL and then restarted my terminal. That correctly set it, but I am worried that this won't persist across upgrades.

One thought I had is setting this via a WIndows variable, which could then be polled to see if it's set. If so, use the variable, and if not, then construct it.

Just curious, do you publish docs? I couldn't really find any.

Describe the solution you'd like A way to set WIN_HOME that persists through upgrades.

Describe alternatives you've considered Manually editing /etc/profile.d/00-remix.sh, but that only exist in the filesystem. I'd like a way to set it externally and then have WSL access it.

Additional context None

crramirez commented 3 years ago

I will transfer this issue to the Fedora Remix issue tracker

crramirez commented 3 years ago

One question. What does the following command output in your configuration:

cmd.exe /c echo %USERPROFILE% 2>/dev/null

cphenry commented 3 years ago

It returns - "C:\Users\chrhenry".

On Thu, Aug 6, 2020 at 3:26 PM Carlos Rafael Ramirez < notifications@github.com> wrote:

One question. What does the following command output in your configuration:

cmd.exe /c echo %USERPROFILE% 2>/dev/null

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues/86#issuecomment-670200355, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ75IY5V7UXYZ43LTL2X73R7MNZDANCNFSM4PW7XRQA .

crramirez commented 3 years ago

And this is right for you? We can change HOMEDRIVE and HOMEPATH to USERPROFILE

cphenry commented 3 years ago

Carlos It works for me, but is that something you can allow the user to configure? I know enterprise Windows can lock a lot of those down, so that users can't modify them.

Thanks, Chris Henry

On Thu, Aug 6, 2020 at 4:18 PM Carlos Rafael Ramirez < notifications@github.com> wrote:

And this is right for you? We can change HOMEDRIVE and HOMEPATH to USERPROFILE

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues/86#issuecomment-670218962, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQ75I65FSWRQBBN3XI64QTR7MTZ3ANCNFSM4PW7XRQA .

crramirez commented 3 years ago

We can use the WSLENV for this. But for now I will change the variable because it will work in more cases, also it is simpler to use just one variable.