Opticos / GWSL-Source

The actual code for GWSL. And some prebuilt releases.
https://opticos.github.io/gwsl/
Other
1.15k stars 79 forks source link

Fish Theming can break app launcher. #59

Open mangkoran opened 3 years ago

mangkoran commented 3 years ago

I am using ArchWSL in WSL2. Default shell is fish. Before using gwsl, I tried VcXsrv. I have this in my config.fish : set -x DISPLAY (ip route | awk '/^default/{print $3; exit}'):0.0 and I can launch Linux GUI apps properly (e.g. emacs). When trying gwsl, I can't launch emacs from "Linux Apps" or "Shourcut Creator". But if I manually use "Linux Shell", and then execute emacs, Emacs opened. Here is my logfile: dashboard.log

mangkoran commented 3 years ago

Already tried this, but it still the same (need to manually open apps from Linux terminal). I guess even without this script, it should be fine?

Pololot64 commented 3 years ago

I am assuming you have GWSL 1.3.7? This should be fixed in GWSL 1.3.8 but just in case it is not, what language/region is your pc and wsl set to?

Pololot64 commented 3 years ago

Also, do you have the store version or github installer version of GWSL?

mangkoran commented 3 years ago

I reported this issue in 1.3.7, then tried the 1.3.8. Both still have the issue. I use GitHub version for both too.

Pololot64 commented 3 years ago

And what language again? Sorry. It is an encoding issue

mangkoran commented 3 years ago

I guess this is what you asking? image Windows

image WSL

Pololot64 commented 3 years ago

Thanks. Thinking...

Pololot64 commented 3 years ago

Here is a test build that should solve the issue. I did not have time to wrap it in an installer but you can extract it as is and run gwsl.exe. Just testing the app-launcher would be good.

Drive is the fastest way of sharing I can think of. I will remove the link after you get it

mangkoran commented 3 years ago

Downloaded. Going to test it now.

mangkoran commented 3 years ago

Still no luck. I cannot see any logfiles created.

Pololot64 commented 3 years ago

Logfiles will still be in appdata/roaming/gwsl

mangkoran commented 3 years ago

Aside from cannot launch emacs from Shortcut Creator, the Linux Apps also displaying loading screen continuously. This is from 1.3.8 and still persist in your recently given build. image

mangkoran commented 3 years ago

The only modified logfile is service.log.

Pololot64 commented 3 years ago

What version and build of windows 10 do you have?

Pololot64 commented 3 years ago

Service.log is unrelated... Wait did you edit your settings.json manually or add a profile?

mangkoran commented 3 years ago

Edition Windows 10 Home Version 20H2 Installed on ‎3/‎23/‎2021 OS build 19042.928 Experience Windows Feature Experience Pack 120.2212.551.0

And no I didn't edit anything.

Pololot64 commented 3 years ago

And you have wsl upgraded to at least support wsl2? The machines themselves do not need to be converted to 2

mangkoran commented 3 years ago

Yes my Arch is on WSL2.

Turns out the dashboard.log is modified earlier.

Pololot64 commented 3 years ago

That is helpful but these do not mention anything about the new build 5 I sent you... Can you close any previously opened gwsl and run from the new folder again?

mangkoran commented 3 years ago

Still no luck. The dashboard.log is not updated either.

Pololot64 commented 3 years ago

Hmm... can you possibly delete the appdata/roaming/GWSL folder completely and then restart the machine?

Technically the error should be fixed so I have no idea what is going on

mangkoran commented 3 years ago

Deleted and restarted, but still cannot launch any Apps.

Pololot64 commented 3 years ago

Any new logs now?

mangkoran commented 3 years ago

Only service.log.

Pololot64 commented 3 years ago

I know you did not change it but can you post your settings.json file?

mangkoran commented 3 years ago

Renamed it to .txt because GitHub doesn't support JSON settings.json.txt.

Pololot64 commented 3 years ago

Oh! I think I know what is going on. Did you allow GWSL through the firewall when it asked?

Pololot64 commented 3 years ago

And the app launcher still finds nothing and spins? Did it in 1.3.7? Sorry I think this is a combination of issues some of which are not bugs

mangkoran commented 3 years ago

Yes I allowed all of them. I tried to remove and re-add the entries (pointing to GWSL_instance.exe and GWSL_vcxsrv.exe. And yet still can't launch app.

And the app launcher still finds nothing and spins? Did it in 1.3.7? Sorry I think this is a combination of issues some of which are not bugs

Yes, it spins the whole time. In 1.3.7 it was fine. It showed the list of the apps, but cannot launch them.

Pololot64 commented 3 years ago

Hope we are not wasting each other's time with confusion.. This is very bizarre. Especially since dashboard.log is never updated. Can you access the path \\wsl$ in explorer?

mangkoran commented 3 years ago

Yes I can image

Pololot64 commented 3 years ago

Rebuilt again... https://drive.google.com/file/d/1gwgvNryQEZD7HBWwQIdEXdb6b3XWooBy/view?usp=sharing

This one will print debug info to a live window. If it crashes copy the text from the debug window and it will close automatically in 10 seconds

mangkoran commented 3 years ago

This is the error log. image

I tinkered a bit around the error log, and found the issue. I also managed to fix the issue, which is something to do with my fish 's conf.d. Will update you tomorrow. It's 2 a.m. here.

If you guessed it's about the terminal color, yep the issue is around that.

Pololot64 commented 3 years ago

Sleep well!

mangkoran commented 3 years ago

Just woke up. I immediately test both Shortcut Creator and Linux Apps, resuming yesterday solution. Both running fine now! I will elaborate my findings.

mangkoran commented 3 years ago

My current setup:

Referring to the error produced earlier, I suspect it has something to do with color settings. In my .config/fish/conf.d folder (which will be initialized every time I open a new terminal window), there is base16.fish. It calls base16-* function, which then set some shell variables for colors. The error message earlier indicate that some of the command in the base16-fish function called is not executed properly, and throwing the error when I tried to open the Linux Apps menu. It's the same when I tried to call a program from Shortcut Creator, but the error from Linux Apps menu has more information about the issue.

image

After I disabled (commented all the lines) base16.fish, it works normally. I am able to launch program from both Shortcut Creator and Linux Apps. I don't know what is really happening here, but it's clearly the base16-fish that causing the error. If you need more information or wants me to do something, let me know.

mangkoran commented 3 years ago

Further investigation:

Testing this solution to previous build you have shared (public beta `1.3.8 build 4 and private beta 1.3.8 build 5 you shared). In build 4 the Linux Apps is showing the list of apps, so I guess it's working. But I cannot launch the app from it. In build 5, the issue is gone. So I think the problem you mentioned before (encoding) is the main issue for me.

Here is a test build that should solve the issue. I did not have time to wrap it in an installer but you can extract it as is and run gwsl.exe. Just testing the app-launcher would be good.

Drive is the fastest way of sharing I can think of. I will remove the link after you get it

Pololot64 commented 3 years ago

By any chance can you share your fish configuration and theme? Then I can try to harden the system from more bugs related to this. But everything is working normal now without too many changes to your system?

mangkoran commented 3 years ago

I will share it tomorrow.

But everything is working normal now without too many changes to your system?

Yes. I think my method to change the terminal color was not typically used (because Windows Terminal theming is pain in the ass). I only use it for this WSL installation. I don't use this "change terminal color" method in my Linux because usually any terminal emulator provide a way to customize it's color.

mangkoran commented 3 years ago

Sorry for the late reply. Here is the repo for the fish config.

Pololot64 commented 3 years ago

No problem (: Thanks!