texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.73k stars 344 forks source link

Cannot open file saved under WSL when using TeXstudio for Windows #1198

Open dclenz opened 4 years ago

dclenz commented 4 years ago

I am using TeXstudio from Windows and attempting to edit files saved on Windows Subsystem for Linux 2 (WSL 2). However, I cannot open files saved under WSL by using the editor. Specifically, using the menus File->Open... and selecting the desired file does nothing. However, if I open the file with TeXstudio from the Windows File Explorer, the file is loaded and all other behavior is normal. I am using the Debian distribution app from Windows, and have not tested if this issue exists for other distros.

Environment

Expected behavior

Clicking File->Open and then selecting a file saved under WSL 2 (Debian) opens the file for editing.

Actual behavior

No response. TeXstudio continues running normally as if command was not issued

How to reproduce

Install WSL 2 on Windows 10. Install the Debian app and set up the Debian distro. Save a .tex file within Debian. Open TeXstudio from Windows and then attempt to open the .tex file from within the editor.

sunderme commented 4 years ago

Works here as expected. What path do you set to find the wsl document?

dclenz commented 4 years ago

I'm using the default UNC path to WSL 2, which has the form: \\wsl$\Debian\home\dclenz\\<filename>.tex

sunderme commented 4 years ago

\wsl$ seems not to work on my machine, someone else has to look.

DStauffman commented 3 years ago

It looks like this is strongly discouraged behavior. It's far better to use WSL to edit the files in your Windows drive under /mnt/c instead of having windows modify the Linux files that are in wsl$. See https://devblogs.microsoft.com/commandline/do-not-change-linux-files-using-windows-apps-and-tools/