common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1k stars 94 forks source link

Chrome on Windows launched via WSL is unable to create a data directory using the WSL path #461

Open Makeshift opened 1 year ago

Makeshift commented 1 year ago

I'm aware the title is somewhat convoluted, so I'll try to explain what I'm doing.

I have installed Granted in my WSL Ubuntu instance. In order to open Chrome on Windows when I run assume in WSL, I have the following config in WSL under ~/.granted/config

DefaultBrowser = "CHROME"
CustomBrowserPath = "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
CustomSSOBrowserPath = "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"

This mostly works fine, but when I attempt to launch a profile with assume profilename -c, I'm given the following warning, which appears to originate from under the wsl.exe process: image

I assume this is because the chrome.exe being launched is unable to resolve the WSL file path being provided. The browser opens with a profile afterwards and appears to work fine, but I imagine any changes I make to that profile won't be saved due to the data directory being unreachable.

Is the method I've used to install not correct, and I should have instead installed granted on Windows, and use assume.exe from within WSL? Or is there a way to provide an alternate Windows path in which to store profile data?

242 appears to imply this should work, but I wasn't able to find documentation to support using granted in this way.