Opticos / GWSL-Source

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

Any Linux app is not opening #29

Closed alok-debnath closed 3 years ago

alok-debnath commented 3 years ago

Any of the linux apps is not opening from "linux apps" section. Is there any step which I might me missing. I have wsl2 with ubuntu 20.04 and its completely working in terminal and also I have xfce gui and its also working.

Edit: Just found that I can open apps through the "linux shell" and also the resolution is low but isn't it supposed to also open apps through "linux apps" section. Also can I also open the xfce gui through this app or in this case I am limited to windows "remote desktop connection" app.

Pololot64 commented 3 years ago

The linux apps section has lots that can be improved. It was an afterthought at first and it can be rewritten. To debug it could you use the shortcut creator to test if apps can run from there? There are multiple possible underlying issues.

alok-debnath commented 3 years ago

@Pololot64 So as you said I tried testing the shortcut creator. I tried creating a shortcut for Firefox (shortcut command: firefox) but after clicking on the created shortcut it doesn't seems to work, the loading cursor do shows up for a second or two but the app doesn't loads up.

Pololot64 commented 3 years ago

Ok. I have a formula for debugging :D. First, is anything in the log file? Second, did you change the default Linux shell? Third, what language and region is your computer set to? If it is none of these issues, it is related to a WSL problem most likely

alok-debnath commented 3 years ago

@Pololot64 I am new at these things but I will try my best. Yes, I had changed the default linux shell (most probably from "Debian x terminal emulator" to "xfce terminal") while I was customizing xfce but now when you said this I have changed it back to "Debian x terminal emulator". And then I shutdown the wsl and tried again on your software to open an app (from "linux apps" as well as using the shortcut) but it failed. I don't actually know where to check the log (If you can guide me then I can do it). My system language is English (US) and English (India) for keyboard, My region is India. Btw, Its midnight for me so I will be back in 7 hours😊

Pololot64 commented 3 years ago

Sleep well

alok-debnath commented 3 years ago

@Pololot64 What should I do next?

Pololot64 commented 3 years ago

Well, to find logs, I wrote this https://opticos.github.io/gwsl/tutorials/manual.html#finding-logs . If they are empty, it most likely means it is a WSL quirk... Are you using ZSH or FISH as a shell? By non default shell I meant something other than bash.

alok-debnath commented 3 years ago

@Pololot64 The service.log and dashboard.log are empty. I am using bash

Pololot64 commented 3 years ago

Strange. Something similar has only been reported once. I am making logging stronger in the next version though so maybe it will be easier to find after I release the update.

alok-debnath commented 3 years ago

@Pololot64 So, I guess I will wait for the next update then

Pololot64 commented 3 years ago

I pressed the release button on the Microsoft Store. It should be certified by Monday and then we can test again if you want

alok-debnath commented 3 years ago

Oh great, I will keep an eye on the arrival of the update 😊

alok-debnath commented 3 years ago

I think there is some issue with my microsoft store, some apps are not updating which includes gwsl. I guess I have to download the version from this github. btw, do you know what might be going on with my microsoft store and how to fix it.

Pololot64 commented 3 years ago

Idk. I don't even have the Microsoft store on my PC. I tried to get it back but never could... Maybe a couple reboots could help. Or running the Microsoft troubleshooter. Does the GWSL update show as available but is just not installing?

alok-debnath commented 3 years ago

when I click on "get updates" it shows gwsl have update but it doesn't downloads the update

Pololot64 commented 3 years ago

Strange. I guess it is just buggy

alok-debnath commented 3 years ago

So, I tried the latest version available on github but it doesn't seems to be working 😥

Pololot64 commented 3 years ago

I thought so. But that is ok because logging is better. Can you possibly open the logs and see what they say? You can access the logs through the systray menu now

alok-debnath commented 3 years ago

Service.log was empty but dashboard.log was there dashboard.log

Pololot64 commented 3 years ago

What version of Windows 10 do you have?

alok-debnath commented 3 years ago

20H2

Pololot64 commented 3 years ago

Just wondering did you right click the systray icon and clear the configuration? Also, can you post the configuration file itself?

alok-debnath commented 3 years ago

Should I upload the setting.json file? or is there any other file and I don't think that I have cleared the logs nor the configuration

alok-debnath commented 3 years ago

settings.txt

Pololot64 commented 3 years ago

Hmm. That looks fine

alok-debnath commented 3 years ago

Weird, right? 😕

Pololot64 commented 3 years ago

I am pretty sure GWSL is functioning properly. This is possibly just caused by a slightly-broken WSL (which happens often it seems).

alok-debnath commented 3 years ago

hm understandable, Any idea to fix it. Most things developed by microsoft seems to have many issues 😅

Pololot64 commented 3 years ago

Maybe install a new distro (like Debian) and test with it.

alok-debnath commented 3 years ago

Hm I will try. But it feels pain to see my C drive getting filled. Does all the data related to a distro get deleted after deleting the application

lucaspwbx commented 3 years ago

I have Ubuntu and Arch installed on Windows. both are not working for me as well

Pololot64 commented 3 years ago

@alok-debnath deleting GWSL does not affect WSL data. Removing WSL itself does. Also deleting a distro does

Pololot64 commented 3 years ago

Do you have different log output? Is this the same bug @lucasweiblen ?

lucaspwbx commented 3 years ago

Do you have different log output? Is this the same bug @lucasweiblen ?

2021-01-24 12:51:19,498 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "/etc/init.d/dbus start &" 2021-01-24 12:51:19,498 - GWSL 1.3.7 - INFO - WSL OUTPUT > 2021-01-24 12:51:19,642 - GWSL 1.3.7 - INFO - (runo3) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" 2021-01-24 12:51:19,642 - GWSL 1.3.7 - INFO - WSL OUTPUT > 172.19.128.1 2021-01-24 12:51:19,642 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=172.19.128.1:0 emacs&" 2021-01-24 14:54:43,387 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "/etc/init.d/dbus start &" 2021-01-24 14:54:43,387 - GWSL 1.3.7 - INFO - WSL OUTPUT > 2021-01-24 14:54:43,559 - GWSL 1.3.7 - INFO - (runo3) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" 2021-01-24 14:54:43,560 - GWSL 1.3.7 - INFO - WSL OUTPUT > 172.21.80.1 2021-01-24 14:54:43,560 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=172.21.80.1:0 emacs&" 2021-01-24 14:55:19,488 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "/etc/init.d/dbus start &" 2021-01-24 14:55:19,488 - GWSL 1.3.7 - INFO - WSL OUTPUT > 2021-01-24 14:55:19,637 - GWSL 1.3.7 - INFO - (runo3) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" 2021-01-24 14:55:19,637 - GWSL 1.3.7 - INFO - WSL OUTPUT > 172.21.80.1 2021-01-24 14:55:19,637 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=172.21.80.1:0 gtk3-demo&" 2021-01-24 14:55:54,438 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "/etc/init.d/dbus start &" 2021-01-24 14:55:54,438 - GWSL 1.3.7 - INFO - WSL OUTPUT > /bin/sh: line 1: /etc/init.d/dbus: No such file or directory 2021-01-24 14:55:54,596 - GWSL 1.3.7 - INFO - (runo3) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" 2021-01-24 14:55:54,597 - GWSL 1.3.7 - INFO - WSL OUTPUT > 172.21.80.1 2021-01-24 14:55:54,597 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=172.21.80.1:0 /usr/bin/bvnc&" 2021-01-24 14:56:54,063 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "/etc/init.d/dbus start &" 2021-01-24 14:56:54,064 - GWSL 1.3.7 - INFO - WSL OUTPUT > 2021-01-24 14:56:54,229 - GWSL 1.3.7 - INFO - (runo3) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" 2021-01-24 14:56:54,229 - GWSL 1.3.7 - INFO - WSL OUTPUT > 172.21.80.1 2021-01-24 14:56:54,229 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Arch . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=172.21.80.1:0 emacs &" 2021-01-24 15:01:44,713 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "/etc/init.d/dbus start &" 2021-01-24 15:01:44,713 - GWSL 1.3.7 - INFO - WSL OUTPUT > 2021-01-24 15:01:44,881 - GWSL 1.3.7 - INFO - (runo3) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" 2021-01-24 15:01:44,881 - GWSL 1.3.7 - INFO - WSL OUTPUT > 172.21.80.1 2021-01-24 15:01:44,881 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=172.21.80.1:0 /usr/bin/emacs&"

Pololot64 commented 3 years ago

Again it might be WSL acting strange. Do apps work when run from the terminal when GWSL is running?

alok-debnath commented 3 years ago

Again it might be WSL acting strange. Do apps work when run from the terminal when GWSL is running

For me, apps do open and work though the terminal

Pololot64 commented 3 years ago

Alok, what happens when you run wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=$GTK_THEME:dark firefox&" in cmd.exe

alok-debnath commented 3 years ago

I got this nohup: ignoring input and appending output to 'nohup.out'

Pololot64 commented 3 years ago

And firefox did not open? Was GWSL running in the background?

alok-debnath commented 3 years ago

Sorry 😅, I thought it will trigger and start gwsl. Just now I tried after opening gwsl and it worked

alok-debnath commented 3 years ago

When I tried again I got this and firefox did not opened /home/alokdebnath/.profile: line 41: syntax error near unexpected token `fi' /home/alokdebnath/.profile: line 41: `fi' nohup: ignoring input and appending output to 'nohup.out'

Any idea?🙄 I did clicked on "Set gtk to" option but then I reverted it back

Pololot64 commented 3 years ago

Ah, can you post the end of .profile relating to GWSL? (sorry this is taking a while to debug)

alok-debnath commented 3 years ago

I just copy pasted this wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=$GTK_THEME:dark firefox&" I am grateful to help, since I only have online classes at least for now so I am free and will be happy to see this app working

alok-debnath commented 3 years ago

Also when I entered firefox in linux shell opened through the option in gwsl I got this Error: no DISPLAY environment variable specified

Pololot64 commented 3 years ago

Ah ok, so can you open the .profile file in linux in a text editor like nano?

Pololot64 commented 3 years ago

If you don't know how, open bash, navigate to the home directory (it should already be there) and type "nano .profile"

Pololot64 commented 3 years ago

Then scroll to the bottom of the file. Can you post a screenshot of what the bottom of the file looks like?

Pololot64 commented 3 years ago

Bash is the WSL terminal for Ubuntu

Pololot64 commented 3 years ago

image

Pololot64 commented 3 years ago

Does this make any sense? sorry