opticos / gwsl-source Goto Github PK
View Code? Open in Web Editor NEWThe actual code for GWSL. And some prebuilt releases.
Home Page: https://opticos.github.io/gwsl/
License: Other
The actual code for GWSL. And some prebuilt releases.
Home Page: https://opticos.github.io/gwsl/
License: Other
Nice tool, tested and works with Ubuntu 20.04 LTS but not once you install and run WSLg in combination with the actual Ubuntu on Windows Community Preview.
I expect for that itβs now needed that you implement what was stated here:
What will happen when WSL2 gets official Wayland support? I am just as excited about this as you are. Till it is available, GWSL will only function as an XServer. When Wayland is available, there will be an option to swicth between Wayland and X as a GWSL backend. The shortcut creator and app launcher will continue to work in the new Wayland mode.
Beside the Ubuntu Preview I installed Debian and Ubuntu 20.04 under WSL2 and all 3 distros are discovered by your tool and work when I start already working GUI Apps via Windows Start menu (new option in the preview). In your Linux Apps Menu they show up but donβt open when clicking them.
The current implementation attempts first to grep the output of ipconfig.exe
for a line starting with Default Gateway:
, which is very flaky as it breaks on any other language.
I installed GWSL from the store to an older PC (Version 1.3.6 (store)).
When GWSL is started, then it reports "LoadLibrary failed with error 87: Wrong parameter".
Then GWSL says: "Hmm... The GWSL service just crashed or was closed. Do you want to restart the service?".
Doing "Yes" repeats the whole process, and saying "No" closes GWSL.
As long as the dialogs are open, the system tray menu of GWSL works, and I can also start the "Distro Tools" etc.
But no X-Server function.
What could I try?
I tried GWSL on another PC with Intel CPU. There everythings works fine! But I would also like to use it on this older system...
I appreciate your help!
(Edited: Added GWSL's version)
While running the app in background I noticed that there are usage spikes about every 5 seconds. I was not yet able to pinpoint which component is directly responsible, but it directly correlates with GWSL running.
I can probably exclude VcXsrv as the culprit since I had been running the most recent standalone version and haven't notices this behavior before.
The 5 second interval of usage of about one full core is a bit annoying, since that keeps the CPU from reducing the core frequency and therefore my fan is constantly spinning.
Further system info: latest Windows 10 2009 Release Preview build, 2 Ubuntu WSL instances, one WSL1 (always running), one WSL2 (running on demand).
When I try to launch an app from Linux Apps, the GWSL just freezes until I force close it
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
If the internet connection is lost, the active windows on the x11 server will close, but the process will remain active.
Steps to reproduce
ps
to check for running processes - the app process will still be active, but you won't be able to use itI am unable to get GIMP running. It crashes on startup.
Are there any necessary details you would require from me?
I have ZSH as my default shell and was wondering if I needed to add any extra lines to zshrc like for Fish? Thanks and really love the application!
Hello! I don't know to contact you so I do it here π
Thanks for sharing your work it is very cool. The problem is I can't see a single application launching on my Windows desktop.
I'm using Ubuntu 20.04 in WSL2 mode.
I just want to open gitkraken for example by launching the gitkraken command. How do I do this ?
Just tried to use a shortcut and test the config.
I know that gitkraken is running on the Ubuntu but nothing happens on the windows side.
Can you help me with that ?
Thanks a lot
No video when playing with ffplay, vlc, etc.
Latest version:
https://sourceforge.net/projects/vcxsrv/files/vcxsrv/1.20.9.0/
This would help with contributions
This is the same issue as VcXsrv https://sourceforge.net/p/vcxsrv/bugs/59/
However, the workaround described there (clicking on the X icon) does not work in GWSL. I realize that GWSL is based on VcXsrv, so probably can't fix the issue itself, but is there at least a workaround like there is in VcXsrv? Otherwise I'm forced to kill either X or WSL in general every time this happens.
Opening a shell with "Linux Shell" option results in syntax errors.
expr: syntax error: unexpected argument β4β
sed: -e expression #1, char 1: unknown command: `,'
expr: syntax error: unexpected argument β4β
sed: -e expression #1, char 1: unknown command: `,'
thearcanebrony@DESKTOP-0ABLLGL:~$```
WSL distro: Ubuntu 20.04.1
Also I noticed something in https://github.com/Opticos/GWSL-Source/blob/master/assets/GWSL_helper.sh:
Is there a reason for the double slashes at lines 114 and 117?:
...
113 echo "injecting dbus into .profile"
114 sed -i.bak '//etc/init.d/dbus start/d' ~/.profile
115 echo "sudo /etc/init.d/dbus start" >> ~/.profile
116
117 sed -i.bak '//etc/init.d/dbus start/d' ~/.bashrc
118 echo "sudo /etc/init.d/dbus start" >> ~/.bashrc
...
Is there a way to use key authentication with this?
GWSL has modified my .bashrc in a way that breaks it:
expr: syntax error: unexpected argument '4'
sed: -e expression #1, char 1: unknown command: `,'
This is in a clean WSL2 Ubuntu 20.04 install.
I can run GWSL for debugging purposes like so: python main.py
However, the tray menu doesn't work correctly for the dashboard, etc. as these menu items call GWSL. It is expecting to find GWSL at the root of the repo (and it isn't there).
I can run python build.py
and build GWSL so that the files exist in the dist/GWSL folder but it looks like there are a lot of files in the distribution and I probably can't copy GWSL by itself into the root of my repo and would like to avoid cluttering the root of the repo with distribution files.
How are you handling this? I'm guessing I'm doing something simple wrong, but haven't figured it out yet!
I know it is definitely possible to get it working by using PulseAudio, here's a handy guide on how I would normally enable it: https://www.linuxuprising.com/2021/03/how-to-get-sound-pulseaudio-to-work-on.html
Hello!
Could you add the ability to disable PRIMARY when using clipboard?
In VcXsrv this is implemented, but in GWSL it is hardcoded:
if clipboard == True:
default_arguments.append("-clipboard")
default_arguments.append("-primary")
else:
default_arguments.append("-noclipboard")
default_arguments.append("-noprimary")
I am using the Store version 1.3.6.0, even after reinstall the app, there are icon on taskbar and notification are but I do not have any windows display
Edition Windows 10 Education
Version 20H2
Installed on β12/β14/β2019
OS build 19042.508
Experience Windows Feature Experience Pack 120.2212.31.0
I see you had left a comment on reddit that GWSL can be used by Kex instead of the default tiger vnc. How can I do that?
The GWSL_EXPORT_DISPLAY
script uses the IP address attached to my WiFi interface. Replacing this IP address with the IP of the virtual interface labeled "WSL" resolves this issue.
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
I would love to participate (at least on my first issue about display variable.) but I found extra spaces in files for no reason.
In order to get help, adding a linter to project and CI would be a nice addition imho
I'd like to contribute to the code. I noticed that there doesn't appear to be any dependency management setup at the moment. I'd be happy to do so but was wondering what dependency management solution you want to use:
The latter two have some significant advantages over requirements.txt option, but between pyproject and pipfile I have no preference.
On a fresh install with Windows 10 Pro Build 21364.co_release.210416-1504
, opening the dashboard only renders the backdrop. It appears the buttons are present and clickable, but there's no text or images rendered on the backdrop. Even more interesting, when attempting to take a screenshot, the text IS visible!
Error occurs if Windows' $PATH env var is not merged into WSL's $PATH. Fails with "expr: syntax error: unexpected argument '4' ":
ipconfig_exec=$(wslpath "C:\\Windows\\System32\\ipconfig.exe")
> if [ -x $(which ipconfig.exe) ]
> then
> ipconfig_exec=$(which ipconfig.exe)
> fi
> wsl2_d_tmp=$($ipconfig_exec | grep -n -m 1 "Default Gateway.*: [0-9a-z]" | cut -d : -f 1)
> if [ -n $wsl2_d_tmp ]
> then
rst_lin> first_line=$(expr $wsl2_d_tmp - 4)
> wsl2_d_tmp=$($ipconfig_exec | sed $first_line,$wsl2_d_tmp!d | grep IPv4 | cut -d : -f 2 | sed -e "s|\s||g" -e "s|\r||g")
> export DISPLAY="$wsl2_d_tmp:0"
> else
> export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk "{print $2}"):0
> fi'
++ wslpath 'C:\Windows\System32\ipconfig.exe'
+ ipconfig_exec=/c/Windows/System32/ipconfig.exe
++ which ipconfig.exe
+ '[' -x ']'
++ which ipconfig.exe
+ ipconfig_exec=
++ grep -n -m 1 'Default Gateway.*: [0-9a-z]'
++ cut -d : -f 1
+ wsl2_d_tmp=
+ '[' -n ']'
++ expr - 4
expr: syntax error: unexpected argument β4β
I have a two monitor setup on my computer. When a new linux app starts up that is not maximized, it will default to the exact center of the desktop instead of the center of the main monitor or one of the monitors. It is not really an issue since I can move the window after it opens but it would look a lot nicer if it did not perform like that.
Amazing software otherwise! Everything else has worked without issue so far!
I wish to enter characters that in native Windows apps I can enter by pressing AltGr+[key].
In GWSL apps the effect of the AltGr key is apparently ignored. Is there a way to enable these combos to work? Or a workround, such as creating an .XCompose file?
Hi,
Thanks for your work, this is a really cool project. I am currently using the GWSL version from github (1.3.7). When I use "test configuration" in the shortcut creator, I have no problem sharing clipboard between linux and windows. However, once I create the short cut with the "add to start menu" button and launch linux from there, clipboard sharing stops working. If it helps, I am using Windows 10 Home Insider Preview Build 21296. Thanks !
Hi, thanks for the awesome app!!
I have small issue to run qtCreator and make the launch apps works with OpenGL I need the Native opengl box of vcxsrv disabled I'm trying to get the same behavior with gwsl but not luck, any idea how can i get this?
Attached is the profile saved from xlaunch of vcxsrv
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="-1" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="" Wgl="False" DisableAC="True" XDMCPTerminate="False"/>
Update:
configuring GSWL vcxsrv flags i get this
Error: couldn't get an RGB, Double-buffered visual
thanks!!
$ python --version
Python 3.8.6
$ sudo -H pip3 install 'pywin32==300'
ERROR: Could not find a version that satisfies the requirement pywin32
ERROR: No matching distribution found for pywin32
The pywin32 package exists for all Python3 versions released to date.
I had upgraded the pip dependency resolver, so I tried:
$ sudo -H pip3 install --use-deprecated=legacy-resolver pywin32
ERROR: Could not find a version that satisfies the requirement pywin32 (from versions: none)
ERROR: No matching distribution found for pywin32
Still no luck :(
Then I found this pywin32
issue: "WSL does not support pywin32". Seems the GWSL-Course installation instructions are for installing on Windows, not WSL. Gee, it would have been really nice to know this up front.
Only after fussing for an hour did I find that I could simply download the prebuilt package using Microsoft Store. Perhaps this information should be put in the project README.
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.
Instances of plain text root password showing in dashboard.log:
21-02-10 09:49:21,482 - GWSL 1.3.7 - INFO - (run) WSL SHELL $ wsl.exe ~ -d Ubuntu . ~/.profile;nohup /bin/sh -c "echo "therootuserspassword" | sudo -H -S sudo /etc/init.d/dbus start &"
Like gedit, vscode with custom titlebar.
(it has been fixed in x410, but it is closed-source product)
Greetings, I'm using GWSL to connect to my prooted linux distro which is running within Termux on my android device. Everything works fine except two things:
I would be so glad if you help me out.
After setting auto display parameter through tool and rebooting WSL, here's my error :
expr: syntax error: unexpected argument β4β
sed: -e expression #1, char 1: unknown command: `,'
expr: syntax error: unexpected argument β4β
sed: -e expression #1, char 1: unknown command: `,'
expr: syntax error: unexpected argument β4β
sed: -e expression #1, char 1: unknown command: `,'
expr: syntax error: unexpected argument β4β
sed: -e expression #1, char 1: unknown command: `,'
I used this in bashrc export DISPLAY="
grep nameserver /etc/resolv.conf | sed 's/nameserver //':0"
and it's working
Hi there, first of all thank you so much for this tool!
After some trial and error I discovered that if I set fish as my default shell in WSL2, then the shortcuts don't work.
I can see some processes spawning and then exiting, no log is produced.
The same happens if I use cmd to run the shortcut command.
switching back to bash "solved" the problem.
I tried to run the various commands and script directly in my fish shell, here's what I found:
The first problem is in the get_ip function:
$ /bin/sh -c "echo $(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')"
fish: $(...) is not supported. In fish, please use '(cat)'.
I set my DISPLAY in both .profile
and .config/fish/config.fish
, so maybe the ip discovery and DISPLAY setting can be omitted here (but I suppose it will break many things).
also setting the envvars doesn't work; in my simple case (no GTK theme set, dark windows theme and everything default):
$ GTK_THEME=Adwaita:dark /opt/pycharm-2020.2.3/bin/pycharm.sh (base)
fish: Unsupported use of '='. To run '/opt/pycharm-2020.2.3/bin/pycharm.sh' with a modified environment, please use 'env GTK_THEME=Adwaita:dark /opt/pycharm-2020.2.3/bin/pycharm.shβ¦'
In short, it would be wonderful if you can also add support to fish!
BTW, reading your code I saw many things that could be improved; are you open to code reviews/PRs? If so, can you please describe your build environment?
Of course, I could also try to fix this issue myself once I know which tools you use
The shortcut creator dialog box shown in the manual should appear.
No dialog appears. dashboard.log
has the following lines appended:
2021-03-23 14:54:46,938 - GWSL 1.3.7 - ERROR - Exception occurred - Error in Mainloop
Traceback (most recent call last):
File "manager.py", line 3244, in <module>
File "manager.py", line 2901, in draw
File "manager.py", line 2851, in short
File "manager.py", line 2176, in shortcut
File "manager.py", line 1897, in get_light
FileNotFoundError: [WinError 2] The system cannot find the file specified
Windows 10.1803.02.0006
Running Ubuntu 20.04 under WSL2.
Is it not possible to install this app on a different drive, Sorry I know that this is not an issue and should not be asked but I had doubts about it. When I first saw this app I thought that this app would allow me to to install a Linux Graphical Environment (GUI) seamlessly π
Hi ,
How I configure support for Colemak layout?
Thank You.
Hi! I've been using GWSL to run graphical Linux apps alongside WSL2, and the experience has been great, so thank you for all this awesome work.
The one thing I would improve about the software, is adding a search bar to the App List, as that's something that I find myself missing each time I want to open a program. Other than that, great product as a whole.
Thank you!
I have installed gwsl from the Microsoft store but when i try to start it say "failed to execute script manager"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.