SUMMARY This might be more of a wish than a bug but: Okular doesn't seem to handle WSL 2 paths correctly, and thus cannot open files on WSL 2. STEPS TO REPRODUCE 1. Set Okular as your default PDF reader 2. In Explorer, open a PDF that is in your WSL 2 image. The explorer path will be "\\wsl$\<wsl-name>\path\to\file.pdf". 3. Okular reports an error: "Could not open file:///<wsl-name>/path/to/file.pdf" OBSERVED RESULT Cannot open WSL 2 files at all. EXPECTED RESULT Can open WSL 2 files normally. SOFTWARE/OS VERSIONS Windows: 10 ADDITIONAL INFORMATION I thought this might be due to handling of Windows network paths incorrectly, since the WSL acts like a network path, but I could access network files correctly so maybe not.
I found a workaround that suggests this may have something to do with the WSL 2 path. If we remount WSL 2 as a drive explicitly, we can open files using Okular. 1. Navigate to `\\wsl$` in Explorer. 2. Right click on the `<wsl-name>` folder and click "Map network drive...". 3. Mount the folder as a new drive, such as `Z:`. 4. Open the same PDF from `Z:path\to\file.pdf` instead of from `\\wsl$\<wsl-name>\path\to\file.pdf`. It will open correctly.