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.

alok-debnath commented 3 years ago

Screenshot (153)

Pololot64 commented 3 years ago

Can you delete from #GWSL_EXPORT_DISPLAY to the bottom? Also, do the same in .bashrc (which is another file). Then go into GWSL and re-export the display again. (just use baskspace to delete)

alok-debnath commented 3 years ago

/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'

This time I didn't get this error but also firefox did not opened

Pololot64 commented 3 years ago

Can you post the bottom of .profile again?

alok-debnath commented 3 years ago

Screenshot (155)

Pololot64 commented 3 years ago

Can you now restart WSL?

alok-debnath commented 3 years ago

Done but still nothing

Pololot64 commented 3 years ago

wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=$GTK_THEME:dark DISPLAY=0.0.0.0:0 firefox&"

Try running this with 0.0.0.0 being your IP. You can find the correct IP by opening bash and typing echo $DISPLAY. Make sure the display port :0 is still at the end of the IP. And don't tell it to me :D

alok-debnath commented 3 years ago

wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=$GTK_THEME:dark DISPLAY=0.0.0.0:0 firefox&"

Still nothing

Pololot64 commented 3 years ago

In that case, WSL is malfunctioning. I'm sorry. I gtg though, I need to work on other things

alok-debnath commented 3 years ago

In that case, WSL is malfunctioning. I'm sorry. I gtg though, I need to work on other things

hm, I get it. Thanks for trying to help all along the way

Pololot64 commented 3 years ago

Update, I just had a thought. I know GWSL_vcxsrv.exe is allowed public access through the firewall. Is it possible that GWSL_instance.exe is not? Both must be granted public access.

alok-debnath commented 3 years ago

So, is there two different versions of gwsl? Is the one in store- vcxsrv and one in github- instance?

Pololot64 commented 3 years ago

They might be duplicated if you have had both the store and the github but no, they are both part of the same thing. GWSL_instance handles shortcuts. If it is not allowed, maybe it is what is causing the issue

Pololot64 commented 3 years ago

Yes. Start-menu , search for firewall --> allow an app through the windows firewall. Then chick change settings and scroll down to GWSL. Then you can change the rules for GWSL_instance. If there are duplicates just enable the disabled ones if any by checking the boxes under public.

alok-debnath commented 3 years ago

Just now I uninstalled the github version and installed the store version. Now this wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=$GTK_THEME:dark firefox&" works and also typing firefox in linux shell works like earlier

Pololot64 commented 3 years ago

Do shortcuts work? Or the app launcher?

alok-debnath commented 3 years ago

Yes I just checked and both seems to be working now. Also before trying to open any linux apps I ticked every wsl related boxes under public in firewall

Pololot64 commented 3 years ago

Cool. Wow that took a while to debug. Sorry about that :) Just don't do that to the firewall normally :) It is best to start with nothing and to enable till it works. That way you don't have unnecessary openings.

Pololot64 commented 3 years ago

@lucasweiblen Did you have this same issue?

alok-debnath commented 3 years ago

Cool. Wow that took a while to debug. Sorry about that :)

So was it the firewall issue?

Pololot64 commented 3 years ago

Well if it fixed the issue, yes

alok-debnath commented 3 years ago

😊 Happy the it got fixed. Can anything be done with the resolution?

Pololot64 commented 3 years ago

I can't change anything unfortunately. Normally it should have asked you to allow but it is possible the window was accidentally closed. I cannot automate the firewall because that could lead to bad security issues. But now I know how to handle this issue in the future. I will try to make a FAQ maybe.

luoyuanbin16 commented 3 years ago

I also have the problem, i try use cmd wsl -d Ubuntu-20.04 . ~/.profile;/bin/sh -c "GTK_THEME=$GTK_THEME:dark DISPLAY=0.0.0.0:0.0 firefox" it didn't work。 image But i use cmd wsl -d Ubuntu-20.04 . ~/.profile;/bin/sh -c "GTK_THEME=$GTK_THEME:dark DISPLAY=$DISPLAY firefox" OR wsl -d Ubuntu-20.04 . ~/.profile;/bin/sh -c "GTK_THEME=$GTK_THEME:dark firefox ,it work

lucaspwbx commented 3 years ago

@lucasweiblen Did you have this same issue?

I will confirm later, not on a windows machine right now. But I'm monitoring the issue. :smiley:

Pololot64 commented 3 years ago

@luoyuanbin16 It is because in the instructions above I said to replace that (0.0.0.0) with the correct IP for your specific machine. In the end, we found that the solution was to let GWSL through the firewall. It was just a missed setup step. Can you verify it is not being blocked by the firewall as well?

lucaspwbx commented 3 years ago

The firewall solution worked for me as well, thanks

Pololot64 commented 3 years ago

Cool. In that case I think I'll close the issue then :)

rlaphoenix commented 3 years ago

I too am having a similar issue in which the applications never run from the shortcuts or app menu. However, instead of the command being e.g. firefox change it to dbus-launch firefox and for whatever reason it will then work.

I had to do this for KDE Dolphin, but strangely if I launch dolphin in the terminal without anything fancy it works right away.

Pololot64 commented 3 years ago

Out of curiosity, what is your default shell set to?

rlaphoenix commented 3 years ago

Out of curiosity, what is your default shell set to?

I'm not really sure. I cant get to my system right now. I am using Windows Terminal and for WSL I'm using ArchWSL by https://github.com/yuk7/ArchWSL

It's generally using a default environment, with the Desktop Environment being KDE Plasma 5.

Pololot64 commented 3 years ago

What happens when you run this echo "$SHELL"? (this prints what the default shell is)

luoyuanbin16 commented 3 years ago

@luoyuanbin16 It is because in the instructions above I said to replace that (0.0.0.0) with the correct IP for your specific machine. In the end, we found that the solution was to let GWSL through the firewall. It was just a missed setup step. Can you verify it is not being blocked by the firewall as well?

I close all firewall,and it still not work. I find some msg in the View Log,maybe can help you find the reason. 2021-01-30 20:20:05,097 - 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-30 20:20:05,097 - GWSL 1.3.7 - INFO - WSL OUTPUT > your 131072x1 screen size is bogus. expect trouble 2021-01-30 20:20:05,447 - 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-30 20:20:05,447 - GWSL 1.3.7 - INFO - WSL OUTPUT > your 131072x1 screen size is bogus. expect trouble 172.23.128.1 2021-01-30 20:20:05,451 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=your 131072x1 screen size is bogus. expect trouble 172.23.128.1:0 firefox&"

luoyuanbin16 commented 3 years ago

@luoyuanbin16 It is because in the instructions above I said to replace that (0.0.0.0) with the correct IP for your specific machine. In the end, we found that the solution was to let GWSL through the firewall. It was just a missed setup step. Can you verify it is not being blocked by the firewall as well?

I close all firewall,and it still not work. I find some msg in the View Log,maybe can help you find the reason. 2021-01-30 20:20:05,097 - 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-30 20:20:05,097 - GWSL 1.3.7 - INFO - WSL OUTPUT > your 131072x1 screen size is bogus. expect trouble 2021-01-30 20:20:05,447 - 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-30 20:20:05,447 - GWSL 1.3.7 - INFO - WSL OUTPUT > your 131072x1 screen size is bogus. expect trouble 172.23.128.1 2021-01-30 20:20:05,451 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:light DISPLAY=your 131072x1 screen size is bogus. expect trouble 172.23.128.1:0 firefox&"

Pololot64 commented 3 years ago

@luoyuanbin16 I don't have time to do the whole thing over again. Your logs do not show anything different. I don't know how to help

iongion commented 3 years ago

For all the apps I am trying to start, I get this:

2021-03-15 14:16:51,595 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:dark DISPLAY=your 131072x1 screen size is bogus. expect trouble
172.21.176.1:0 gnome-control-center&"
2021-03-15 14:17:16,785 - 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-03-15 14:17:16,785 - GWSL 1.3.7 - INFO - WSL OUTPUT > your 131072x1 screen size is bogus. expect trouble
2021-03-15 14:17:17,597 - 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-03-15 14:17:17,597 - GWSL 1.3.7 - INFO - WSL OUTPUT > your 131072x1 screen size is bogus. expect trouble
172.21.176.1
2021-03-15 14:17:17,597 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:dark DISPLAY=your 131072x1 screen size is bogus. expect trouble
172.21.176.1:0 tilix&"
Pololot64 commented 3 years ago

First of all @iongion gnome-control center is hard to get working and is not a good app to test with. Tilix does normally work. What happens if you run TIlix from the Ubuntu shell directly? (Make sure GWSL is still running in the background)

iongion commented 3 years ago

If I type in the shell prompt with this in my .profile

export GDK_SCALE=1
export QT_SCALE_FACTOR=1
export GDK_DPI_SCALE=-1
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1

then it runs.

If I click the tilix app in the menu, nothing happens. In fact, none of the apps listed in the menu work

image

Pololot64 commented 3 years ago

What happens when you click the link icon next to any of the apps listed? For example, for Tilix what is in the Shortcut Command box?

iongion commented 3 years ago

image

Pololot64 commented 3 years ago

What happens when you run this in cmd.exe? wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:dark DISPLAY=172.21.176.1:0 tilix&"

iongion commented 3 years ago

all good - it starts image

Pololot64 commented 3 years ago

Strange. That is the command that GWSL is running...

Pololot64 commented 3 years ago

Wait. Did you allow GWSL_instance.exe to have public access through the firewall? @iongion That is probably the issue

iongion commented 3 years ago

I don;t know what I did honestly. Typical windows mentality when I am in windows ... next next next

On Tue, Mar 16, 2021 at 5:40 PM Pololot64 @.***> wrote:

Wait. Did you allow GWSL_instance.exe to have public access through the firewall? @iongion https://github.com/iongion That is probably the issue

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Opticos/GWSL-Source/issues/29#issuecomment-800423742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGT2GPBM6DLWJ4CTFUVGOLTD6CW7ANCNFSM4V3RK3LQ .

-- Ionut Stoica http://www.zend.com/en/yellow-pages/ZEND016175 Zend Certified Engineer http://www.zend.com/en/yellow-pages/ZEND016175

Pololot64 commented 3 years ago

That's ok. Yep I relate. I tried to make it add the rule automatically but Microsoft did not want that in the store :)

If you want you can allow it through Control Panel --> System and Security --> Allow an app through Windows firewall. Make sure the public boxes of GWSL_vcxsrv.exe and GWSL_instance.exe are checked. GWSL_vcxsrv is probably already checked

orzklv commented 3 years ago

That's ok. Yep I relate. I tried to make it add the rule automatically but Microsoft did not want that in the store :)

If you want you can allow it through Control Panel --> System and Security --> Allow an app through Windows firewall. Make sure the public boxes of GWSL_service.exe and GWSL_instance.exe are checked. GWSL_service is probably already checked

@Pololot64 not working =)

Screenshot (2) Screenshot (3)

Pololot64 commented 3 years ago

@genemators I don't have any of your debug info yet but you can look around this issue and see if your issue is caused by some already known problem. Most problems I solve are duplicates.

joaodriessen commented 3 years ago

I have had GWSL installed for months, and could never get it to work... Allowing GWSL through windows firewall as per pololot64's comments did the trick! Don't know why this isn't getting set up automatically, but all good, thanks for the tip!