NathanCastle / BootShellCredentialProvider

Windows 10 Credential Provider intended to simplify the process of logging directly into alternative shells to Windows Explorer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VcXsrv options hard-coded in ConfigurableShell.cpp / WSL 2 broken :(

piousminion opened this issue · comments

With WSL 2, the linux distro has it's own private IP. This is no problem if I run vcXsrv myself with relevant config options, but you've hard-coded the settings in ConfigurableShell.cpp.

As such, the linux distro's X clients cannot connect to the vcXsrv instance. Could you move the command-line options used to a simple ini file in the install directory? e.g. commandline="-arg -arg" If so, this would solve a lot of other problems, including the multiple monitor issues.

I would compile the code myself, but I have no clue where to begin. There hasn't been any activity on the repo since 2018, but I'm hoping you could spare a few minutes of your time to make this change. This project is just too good to not live on, and making that small change would go a long way.

Thank you for your time, and the work you've done here. :)

It has been some time since I've looked at this project - I haven't given it any serious consideration since WSL2 came out.

I'll take a look at fixing this up to at least enable you to make progress. No promises though, there have been reports of broader issues getting this working. If I can get it working, it will be interesting to see how it can be improved for WSL2 and other developments in the Windows ecosystem.

Thanks for the interest. I'll reply here if I'm able to make progress.

Not sure what other issues there could be. Everything worked fine for me except blocking the "remote" connection.

Hell, if this line was modified to allow remote X connections and built, that would solve much of the issue.

I could easily make the change myself if I had any clue how to build this project. :P

Any input you might provide would be greatly appreciated.

Hi sorry for the delay. I meant to work on this last weekend but life got in the way.

Its been a long time since I’ve looked at win32 C++ at all, so it’s taking some time to re-familiarize myself.

Last night I started modifying the project to store the xming command as a registry key, which you could configure with the included configuration app. Given my notable lack of recent C++ experience, following the existing pattern there seemed to be the shortest path to getting something working for you.

I’ll keep working on that and try to get something done tonight. I’m hoping everything works without issue, but it’s been a long time since I’ve attempted to build the whole thing, so I can’t make any promises.

I'm about to push a branch. In the meantime, I've attached a zip with the .MSI and a .reg file. I didn't document needing to manually install the registry keys, but I suspect it is necessary. I tested just now in Windows sandbox and saw that after running the .msi, installing the keys from the .reg file, and running the configurator+saving, I was able to use the credential provider through the lock screen. There very well may be other problems I didn't notice.

It turns out my recollection of win32 concepts is worse than I thought, so fair warning that this code is breaking some rules and liable to break or introduce security vulnerabilities. I don't recommend running on your main desktop; if you (I) break winlogon, it can be hard to get it working again.

With that disclaimer...

Winstaller.zip

P.S. if you're having trouble building locally, you may have better luck following a specific order:

  1. RegProvider
  2. ConfigurableShell
  3. BootShellCredentialProvider
  4. Configurator
  5. Winstaller

I'm sure there's a way to get the solution to build everything in the right order. Apparently I failed to do that initially and its past my bedtime so I'll have to come back another day.