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

GWSL freezes when I try to launch app from Linux Apps #54

Closed weeebdev closed 3 years ago

weeebdev commented 3 years ago

When I try to launch an app from Linux Apps, the GWSL just freezes until I force close it image

My default shell is fish and I installed it from the store. Yes, I added this to my config.fish

Also, an app look gigantic if I set both dpis

### Export DPI
export GDK_SCALE=2
export QT_SCALE_FACTOR=2

image

weeebdev commented 3 years ago

Also, it seems to me that the configuration from the manual breaks my code and other commands, so I left it like:

export DISPLAY=(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
Pololot64 commented 3 years ago

First of all, you do not need to set both DPI values. Do you have a hidpi display?

Also, about the freezing bug, this is new to me. Can you send the relevant logs in dashboard.log? You can access them in GWSL --> About --> View Logs

weeebdev commented 3 years ago

First of all, you do not need to set both DPI values. Do you have a hidpi display?

Also, about the freezing bug, this is new to me. Can you send the relevant logs in dashboard.log? You can access them in GWSL --> About --> View Logs

Well, actually, I don't know whether my display hidpi or not. My display 13'' Full HD. I just thought that I should use hidpi since when I was configuring VcxSrv to get rid of the low resolution, I set hidpi settings in Windows and it worked.

When I'm using my previous config for VcxSrv `config.fish` ```fish ### Exporting display for x server export DISPLAY=(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0 export GDK_DPI_SCALING=1.25o ``` `dashboard.log` ```log 2021-03-30 15:40:46,759 - 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-30 15:40:46,760 - GWSL 1.3.7 - INFO - WSL OUTPUT > ~/.profile (line 21): Unsupported use of '='. In fish, please use 'set PATH "$HOME/bin:$PATH"'. from sourcing file ~/.profile .: Error while reading file '/home/adil/.profile' 2021-03-30 15:40:47,009 - 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-30 15:40:47,010 - GWSL 1.3.7 - INFO - WSL OUTPUT > ~/.profile (line 21): Unsupported use of '='. In fish, please use 'set PATH "$HOME/bin:$PATH"'. from sourcing file ~/.profile .: Error while reading file '/home/adil/.profile' fish: $(...) is not supported. In fish, please use '(cat)'. . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" ^ 2021-03-30 15:40:47,010 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:dark DISPLAY=~/.profile (line 21): Unsupported use of '='. In fish, please use 'set PATH "$HOME/bin:$PATH"'. from sourcing file ~/.profile .: Error while reading file '/home/adil/.profile' fish: $(...) is not supported. In fish, please use '(cat)'. . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" ^:0 /opt/sublime_text/sublime_text&" ``` And nothing happens.
When I use configs from manual `config.fish` ```fish ### GWSL export set --export WSL2 1 set ipconfig_exec (wslpath "C:\\Windows\\System32\\ipconfig.exe") if which ipconfig.exe >/dev/null set ipconfig_exec (which ipconfig.exe) end set wsl2_d_tmp (eval $ipconfig_exec | grep -n -m 1 "Default Gateway.*: [0-9a-z]" | cut -d : -f 1) if test -n "$wsl2_d_tmp" set first_line (expr $wsl2_d_tmp - 4) set wsl2_d_tmp (eval $ipconfig_exec | sed $first_line,$wsl2_d_tmp!d | grep IPv4 | cut -d : -f 2 | sed -e "s|\s||g" -e "s|\r||g") set --export DISPLAY "$wsl2_d_tmp:0" set -e first_line else set --export DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 end set -e wsl2_d_tmp set -e ipconfig_exec ### Export DPI export GDK_SCALE=2 export QT_SCALE_FACTOR=2 ``` `dashboard.log` ```log 2021-03-30 15:49:16,211 - 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-30 15:49:16,212 - GWSL 1.3.7 - INFO - WSL OUTPUT > ~/.profile (line 21): Unsupported use of '='. In fish, please use 'set PATH "$HOME/bin:$PATH"'. from sourcing file ~/.profile .: Error while reading file '/home/adil/.profile' 2021-03-30 15:49:16,568 - 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-30 15:49:16,568 - GWSL 1.3.7 - INFO - WSL OUTPUT > ~/.profile (line 21): Unsupported use of '='. In fish, please use 'set PATH "$HOME/bin:$PATH"'. from sourcing file ~/.profile .: Error while reading file '/home/adil/.profile' fish: $(...) is not supported. In fish, please use '(cat)'. . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" ^ 2021-03-30 15:49:16,568 - GWSL 1.3.7 - INFO - (runos) WSL SHELL $ wsl.exe ~ -d Ubuntu-20.04 . ~/.profile;nohup /bin/sh -c "GTK_THEME=Adwaita:dark DISPLAY=~/.profile (line 21): Unsupported use of '='. In fish, please use 'set PATH "$HOME/bin:$PATH"'. from sourcing file ~/.profile .: Error while reading file '/home/adil/.profile' fish: $(...) is not supported. In fish, please use '(cat)'. . ~/.profile;/bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')" ^:0 /opt/sublime_text/sublime_text&" ```
weeebdev commented 3 years ago

Also, it doesn't freeze anymore

Pololot64 commented 3 years ago

Hmm... unfortunately I do not know much about fish... I did alot of research but cannot find anything.. The script in the manual was writen by someone who used fish but maybe it does not apply any more

weeebdev commented 3 years ago

Hmm... unfortunately I do not know much about fish... I did alot of research but cannot find anything.. The script in the manual was writen by someone who used fish but maybe it does not apply any more

Well, as far as I see the problem is related to #14 . So, from the logs, I can say, that it's just trying to execute bash script via fish and that's all. If we could somehow identify the default shell and use an appropriate script for each of the shells, it should work. Unfortunately, I'm not qualified enough to contribute. Do you have any discord server for contributors where we could discuss it?

Pololot64 commented 3 years ago

It is not specifically for developers but the link for the discord is on the GWSL help page. https://discord.gg/VkvNgkH