GithubHelp home page GithubHelp logo

wslutilities / wslu Goto Github PK

View Code? Open in Web Editor NEW
3.2K 56.0 153.0 6.44 MB

A collection of utilities for Windows Subsystem for Linux

Home Page: https://wslutiliti.es/wslu

License: GNU General Public License v3.0

Shell 94.57% Makefile 2.24% VBScript 0.44% PowerShell 2.74%
bash shell wsl ubuntu opensuse sles bashonwindows kali-linux debian pengwin

wslu's People

Contributors

beatcracker avatar cerebrate avatar cjonesy avatar crramirez avatar elibarzilay avatar epiciskandar avatar gbraad avatar gurnec avatar hyperupcall avatar imaandrew avatar imba-tjd avatar isaacoscar avatar jazo avatar jeunghunkim avatar kamszyc avatar kbpk avatar luanvso avatar lucyllewy avatar lunchb0ne avatar miduddin avatar monkeywithacupcake avatar patrick330602 avatar ricardosantos9521 avatar sanz009 avatar seb128 avatar sirredbeard avatar smoothieewastaken avatar tailgo avatar thomasmaurer avatar tranzystorekk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wslu's Issues

WSLFetch shows incorrectly because of tab width

Background Information:

  • Build: Microsoft Windows [Version 10.0.18363.752]
  • WSL: Happens on Ubuntu (19.10) and openSUSE Leap (42.3).
  • Version: wslu v3.0.0-1; wslfetch v44 (openSuse) wslu v2.3.2; wslfetch v44 (Ubuntu)

Describe the bug

When you run wslfetch it displays incorrectly, the system info ends up way to the right, and ends up creating a new line, disrupting the logo.

This is what happens when you first run it (started from bash --noprofile --norc:

image

Then, if you resize the window, it shows correctly:

image

But if then you run it again, it again calculates the columns incorrectly, and overlaps:

image

So this shows that it is not a problem of the window being too small (not enough columns), but wslfetch is calculating the width it needs incorrectly.

To Reproduce
Run wsl and then wslfetch.

Expected behavior
wslfetch understands the number of columns and shows up correctly.

Extra 'fi' at line 124 of wslu_header

Background Information:

  • Build: Win 10 Pro 1909
  • WSL: Pengwin
  • Version: 2.3.5-2

Describe the bug
Attempting to run any wslu command results in an error. e.g.:
$ wslvar JAVA_HOME
/usr/bin/wslvar: line 125: syntax error near unexpected token else' /usr/bin/wslvar: line 125: else'

To Reproduce
Run any wslu command

Expected behavior
The command will run normally.

Additional context
There's 2x if and 3x fi in wslu_header (https://github.com/wslutilities/wslu/blob/master/src/wslu-header#L124), and the resulting imbalance is causing errors. Someone has already created pull request #106 to fix it.

No release file on Disco

Background Information:

  • Build: 18362.175
  • WSL: Ubuntu 19.04
  • Version: 2.1 (Latest?)

Describe the bug
When installed on Ubuntu 19.04, I can no longer do apt (apt-get) update. It fails with:

Hit:1 http://archive.ubuntu.com/ubuntu disco InRelease
Get:2 http://archive.ubuntu.com/ubuntu disco-updates InRelease [97.5 kB]
Get:3 http://archive.ubuntu.com/ubuntu disco-backports InRelease [88.8 kB]
Get:4 http://security.ubuntu.com/ubuntu disco-security InRelease [97.5 kB]
Ign:5 https://packagecloud.io/whitewaterfoundry/wslu/ubuntu disco InRelease
Err:6 https://packagecloud.io/whitewaterfoundry/wslu/ubuntu disco Release
  404  Not Found [IP: 54.241.144.200 443]
Reading package lists... Done
E: The repository 'https://packagecloud.io/whitewaterfoundry/wslu/ubuntu disco Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

To Reproduce

  • Install Ubuntu from Windows Store.
  • Change channel to "normal"
  • Release upgrade to 19.04
  • Install wslu per instructions
  • Try to do sudo apt upgrade (or sudo apt-get upgrade)

Expected behavior
I would expect apt not to fail. I see there is no Disco release file, but everything installed correctly, just can't update anything anymore.

wslusc screws fonts

Using W10 r18932

Typing 'wslusc' on a WSL2/Ubuntu 18.04 uptodate instance leads to have the Ubuntu instance font changing/being screwed untill the app is restarted

Doesn't follow root mount directory set in wsl.conf

Background Information:

  • Build: 17763.55
  • WSL: WLinux Debian GNU/Linux 9 (stretch)
  • Version: 1.9.25

Describe the bug
In /etc/wsl.conf, I have root = / set so instead of my drives being in /mnt/c /mnt/d etc, they are at /c /d. These utilities only look in /mnt so many of them error out with "No such file or directory".

To Reproduce
Steps to reproduce the behavior:

  1. sudo nano /etc/wsl.conf
  2. Add/change under [automount] the root option to root = /
  3. Restart anything related to wsl so the drives can be remounted.
  4. See if it worked by running ls -la / to see if c is listed.
  5. Run wslusc or other command to see the errors.

Expected behavior
If drives are mounted elsewhere than "mnt", the scripts should find the right drive.

Additional context
Add any other context about the problem here.

convert-im6.q16: width or height exceeds limit `/c/Users/axhe/wslu/designer-qt5.ico' @ error/icon.c/WriteICONImage/928.

Background Information:

  • WSL: [Ubuntu 18.04]
    sudo dpkg -l | grep wslu ii wslu 2.2.0-0 all A collection of utilities for Windows 10 Linux Subsystem

Describe the bug
Creating the ico file fails error.

Command:
wslusc --name Qt 5 Designer --icon /usr/share/pixmaps/designer-qt5.png --gui /usr/lib/qt5/bin/designer
Output:

[info] You choose to use custom icon: /usr/share/pixmaps/designer-qt5.png. Processing...
[info] Converting png icon to ico...
convert-im6.q16: width or height exceeds limit `/c/Users/axhe/wslu/designer-qt5.ico' @ error/icon.c/WriteICONImage/928.
[info] the following custom variable/command will be applied: source ~/.wslenv;
[info] Create shortcut Qt 5 Designer.lnk successful

To Reproduce
install qtcreator in Ubuntu 18.04 and create the link as in above command.

Workaround/fix
Setting -resize 256X256 for the convert command in wslusc fixes the issue for me.

Support for eBPF

Is there any roadmap to provide this support for eBPF on WSL?

Can't install wslu on Alpine

Background Information:

  • Build: Version 10.0.19041.207
  • WSL: Alpine Linux v3.11.3

Describe the bug
I can't install it, as per the readme file, with the commands:

echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing/" | sudo tee -a /etc/apk/repositories
sudo apk update
sudo apk add wslu@testing

I get an error:

# apk add wslu@testing
ERROR: unsatisfiable constraints:
  wslu (missing):
    required by: world[wslu]

To Reproduce
Install Alpine Linux from the store, run it, type su, enter password, install sudo (apk update; apk add sudo), run the above commands.

Expected behavior
wslu is installed.

Enhancement: wslupath -> wslvar

wslpath is already better than wslupath in path conversion. I will remove the path conversion feature from next build, hence wslupath already provide some useful system variable(like localappdata and appdata), the executable will now be wslvar.

x-www-browser - tcgetpgrp problem.

Background Information:

  • Build: 18875.1000 (version 1903)
  • WSL: Pengwin
  • Version: 1.2.3.0

Describe the bug
x-www-browser command has problem with "tcgetpgrp" and It looks like "tcgetpgrp" problem. But when I checked the internet it shows, it is an old bug and It was fixed.

To Reproduce
I ran jupyter lab (it should open "localhost" link for auth)

Expected behavior
x-www-browser should work

Additional context

To confirm it is actually coming from your x-www-browser

bug1

First picture with "windows interoperability"

bug2

Second picture has no "windows interoperability" and basically no "tcgetpgrp" problem appeared

If there is anything needed, I would love to provide it.

Thank you.

Cannot create directory "//.cache": Permission denied

Background Information:

  • Build: 17763
  • WSL: Ubuntu 18.04.03
  • Version: wslu/bionic-updates,now 2.3.2-0ubuntu2~18.04.3 all [installed]

Describe the bug
While starting mysql server using the command "sudo service mysql start", starts mysql successfully but reports the following error:

mkdir: cannot create directory ‘//.cache’: Permission denied
-su: 19: /etc/profile.d/wsl-integration.sh: cannot create //.cache/wslu/integration: Directory nonexistent

reg.exe: command not found

Background Information:

  • Build: 19041.264
  • WSL: Ubuntu 20.04
  • Version: ubuntu-wsl 1.450; wslu 2.3.6-0ubuntu1

Describe the bug
wsl.conf:

[automount]
enabled = true
mountFsTab = true
options = "metadata,umask=0022,fmask=0011,case=off"
root = /

[interop]
enabled = true
appendWindowsPath = false

[network]
generateHosts = true
generateResolvConf = true

Note: I do not append Windows paths so I often see the error:

reg.exe: command not found

To Reproduce

❯ wslfetch
/usr/bin/wslfetch: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found

                          ./+o+-      Windows 10 Linux Subsystem
                  yyyyy. 'yyyyyy+     sean@hal
              .;//+/////h yyyyyyo     BUILD:    19041
           .++ .:/++++++/-.`sss/`     BRANCH:   vb_release
         .:++o: `\++++++++/:---:/-    RELEASE:  Ubuntu 20.04 LTS
        o:+o+:++. `````'-/ooo+++++\   KERNEL:   Linux 4.19.84-microsoft-standard
       .:+o:+o/.          `+sssooo+\  UPTIME:   0d 4h 15m
  .++/+ +oo+o:`             \sssooo;
 /+++//+: oo+o
 \+/+o+++ o++o               ydddhh+
  .++.o+ +oo+:`             /dddhhh;
       .+.o+oo:.           oddhhhh+
        \+.++o+o` -,,,,.:ohdhhhhh+
         `:o+++  ohhhhhhhhyo++os:
           .o: .syhhhhhhh'.oo++o.
               /osyyyyyyy.oooo+++\
                   ````` +oo+++o:/
                          `oo++'`

❯ wslview http://www.google.com
/usr/bin/wslview: line 108: reg.exe: command not found

❯ xdg-open http://www.google.com
/usr/bin/x-www-browser: line 108: reg.exe: command not found

Expected behavior

Don't show spurious "command not found" errors.

baseexec_gen for non-Store distros

Background Information:

  • Build: 19041.21 (should be unrelated)
  • WSL: Arch
  • Version: current

Describe the bug
The new "baseexec_gen" function, which has to succeed at least once,

To Reproduce
Steps to reproduce the behavior:

  • Install a non-store Distro (using wsldl, or wsl --import
  • Install wslu >= 2.3.3 in that Distro
  • Run any wslu command (wslvar, wslview, wslupath, wslsys, wslfetch, wslusc, and wslsys are all affected)
    • See error messages appear related to a registry key and some path executables listed by find
    • From what I can tell, the commands then proceed to function correctly despite this function failing.

Expected behavior
A clear and concise description of what you expected to happen.

  • wslu commands to function as normal, without error messages

Additional context
Add any other context about the problem here.
The current baseexec_gen in the header expects a registry key called "PackageFamilyName" to be present for the current Distro, which doesn't seem to be created for Distros installed manually instead of through the store.

Also, within that function, the first call to reg.exe doesn't fully qualify the path which may cause issues if these commands are run during login before $PATH is fully set up.

wslupath manpage out-of-date

Background Information:

  • Build: 1909 18363.657
  • WSL: Ubuntu 18.04
  • Version: 2.3.2

Describe the bug
The manpage for wslupath contains out-of-date information. Specifically, it wasn't updated with commit fb8a409.

To Reproduce
man wslupath

Expected behavior
Deprecated or not, one should expect a correct manpage.

wslact time-sync throws "date: invalid date"

Background Information:

  • Build: 19041.173
  • WSL: Ubuntu 18.04
  • Version: 3.0

Describe the bug
This probably happens when linux and windows languages are different

  • Windows is in pt-pt when i run "Get-Date -UFormat "%d %b %Y %T %Z" date "14 abr 2020 13:38:09 +01" is returned (month is in portuguese). Ubuntu is in english and will not accept month 'abr'.

To Reproduce

ricardo@surface: sudo wslact ts
[info] Before Sync: 14 Apr 2020 00:12:28 WEST
date: invalid date '14 abr 2020 13:45:57 +01'
[error] Time Sync failed.

Expected behavior
wslact time-sync should set Windows date in Ubuntu.

Additional context

  • I try the command in powershell "Get-Date -UFormat "%d %m %Y %T %Z" to display month with numbers ("14 04 2020 13:45:57 +01") but date -s doesn't accept the format either.
  • There is also a problem with the +01 for some reason date -s doesn't accept that (returns "date: extra operand ‘+01’") but accept +01:00.

why is wslupath deprecated

it seems the tool is still useful

users wont always need to just convert environmental variables

users might need to convert arbitrary paths

Cygwin project has similar tool Cygpath

[New Feature] wslstart

the Cygwin project has this tool, which opens a FILE with the default application

it seems the closest match is wslview, but only works with URLs not local files

Proposal: reg.exe Enhancement

Use Get-ItemProperty (e.g. (Get-ItemProperty Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\WLinux\command).'(default)') instead of old reg.exe

wslusc: Please detect which wsl distribution should be used to start the command

Background Information:

  • Build: all
  • WSL: Ubuntu 16.04 and Ubuntu 18.04
  • Version: 1.9

Describe the bug
When wslusc is executed it creates a link to start the specified command in the default WSL distribution.

To Reproduce

  • Install both Ubuntu 16.04 and Ubuntu 18.04 WSL apps.
  • Install xterm in the non-default one
  • Run wslusc -g xterm in the non-default one
  • Observe that the created shortcut tries to start xterm in the default distribution, failing to do so.

Expected behavior
Wslusc should detect which WSL distribution name should the shortcut use to start the command in the right distribution.

generated shortcuts open in a second (additional) window on taskbar in win10

When I create shortcuts using wslusc , if pinning them to the taskbar the following occurs:

InkedAnnotation 2019-04-24 071828_LI

If you try to pin the second icon, it ends up turning into the xserver application icon (x410 in my case), which results in this:

Annotation 2019-04-24 072910

Hope someone knows the solution, and I imagine it could also be an issue with x410 or pengwin, so the issue may need to be posted there instead (sorry if thats so!)

Thanks
Jared

Future of wslupath

In the current new release, wslupath is deprecated and replaced by wslvar, but wslupath can be still useful in some situations. So, I am planning to bring back wslupath and refactor its code in the release 2.1.

Suggested by @crramirez

Feature Request: man pages based on the wiki pages

After running wslupath it wasn't obvious for me how to use it and neither the -h help, my first reaction was running a man wslupath which yields a not found message. After some googling I found the wiki on this repository which had the information I was looking for, making it available as a man page would be really useful for users coming from a *nix background.

--- EDIT

If that sounds like a good idea , the ronn tool converts the wiki md's nicely into manpages. as seen here: man -l wslupath.txt

[New Feature] wslconf

This will be the first component of wslu written in C. Thus, it will be developed in a dedicated repo: https://github.com/wslutilities/wslconf

Update 1: as more I think about it, it is better to write it as a Windows Desktop app to manage all system at once instead of just each command per system, Also, put on the store.

Cannot use wslusc

Background Information:

  • Build: 17134.1.amd64fre.rs4_release.180410-1804
  • WSL: Ubuntu 16.04.4 LTS
  • Version: v1.5.18

Describe the bug
Cannot use wslusc to create a GUI shortcut.

To Reproduce
Steps to reproduce the behavior:

  • Type wslusc -g ~/eclipse/eclipse
    Results in (italian language sorry)
Impossibile salvare il collegamento "C:\Users\USER\AppData\Local\Temp\home\USER\eclipse\eclipse.lnk".
In riga:1 car:243
+ ... ts='-c "cd ~ && DISPLAY=:0 /home/USER/eclipse/eclipse"';$s.Save();
+                                                                ~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], DirectoryNotFoundException
    + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException

mv: cannot stat '/mnt/c/Users/USER/AppData/Local/Temp//home/USER/eclipse/eclipse.lnk': No such file or directory
[info]Create shortcut /home/USER/eclipse/eclipse.lnk successful

Note: I've replaced my home directory with "USER" for privacy.

Expected behavior
A link should be created.

Additional context
If I create manually the temporary directory seems working:

$ mkdir -p /mnt/c/Users/USER/AppData/Local/Temp/home/USER/eclipse
$ wslusc -g ~/eclipse/eclipse
[info]Create shortcut /home/USER/eclipse/eclipse.lnk successful

Problems with package for wsl-translinux

Just a couple of issues to resolve before I can accept it into the repository:

  1. Looks like the scripts are being placed in /usr/bin with owner and group as the wsl user (i.e., showing on my system as avatar/avatar); since they're in /usr/bin, they need to install as root/root.

  2. The package is taking a dependency on ppa-purge . While that works on Ubuntu, ppa-purge isn't an installable package on Debian, which breaks the install:

$ sudo apt show ppa-purge
Package: ppa-purge
State: not a real package (virtual)
N: Can't select candidate version from package ppa-purge as it has no candidate
N: Can't select versions from package 'ppa-purge' as it is purely virtual
N: No packages found

...or, if manually installed, subsequent updates:

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 wslu : Depends: ppa-purge but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
[1]    24214 exit 100   sudo apt upgrade

Once these are resolved, I'll be happy to accept it.

WSLUSC giving error and creating folder in $HOME

Background Information:

  • Build: 18282.100
  • WSL: Wlinux
  • Version: 1.1.25.0

Describe the bug
wslusc go wild ! :)

image

To Reproduce
wslusc code(or anything else)

I literally did nothing but completely go wild and creating "folders" but they're probably all "commands" and variables.

wslfetch errors on Alpine due to wrong `grep` used

Background Information:

  • Build: 10.0.19041.207
  • WSL: Alpine Linux 3.11.3
  • Version: wslu v3.0.1-1; wslfetch v44

Describe the bug
It seems that an error in a call to grep fails.

This is the error screen:
error on alpine

The error message is:
grep: unrecognized option: P

I tried it on bash and on ash.

To Reproduce
Install Alpine Linux from the store, install wslu, run wslfetch.

Expected behavior
It shows the usual fetch screen.

Unsupported OS???

WTF?

uname -a
Linux PC 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 GNU/Linux`

me@pc:~$ curl -s https://packagecloud.io/install/repositories/whitewaterfoundry/wslu/script.deb.sh | sudo bash
[sudo] password for me:
Detected operating system as Kali/kali-rolling.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/whitewaterfoundry_wslu.list...curl: (22) The requested URL returned error: 404

Unable to download repo config from: https://packagecloud.io/install/repositories/whitewaterfoundry/wslu/config_file.list?os=Kali&dist=kali-rolling&source=script

This usually happens if your operating system is not supported by
packagecloud.io, or this script's OS detection failed.

You can override the OS detection by setting os= and dist= prior to running this script.
You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version

For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh

If you are running a supported OS, please email [email protected] and report this.`

Connecting to X Server in wsl-integration.sh causes very long startup times in WSL

Background Information:

  • Build: 19033
  • WSL: Ubuntu 18.04
  • Version: ??

Describe the bug
There are reports that the latest update in WSLUtilities causes a very long startup time in WSL2.

Please see the attached threads for descriptions and reproductions:
microsoft/WSL#4737
microsoft/WSL#4725

To Reproduce
See attached threads.

Expected behavior
Startup time in WSL should be fast.

Additional context
This seems to be related to checking for an X server and for audio:
microsoft/WSL#4737 (comment)

Thanks!

wslview open file by absolute path failed

I use wslview to open a file by absolute path failed with the following error message:

$ wslview /home/panjie/temp/aaa.docx

Start : 由于出现以下错误,无法运行此命令: 系统找不到指定的文件。。
所在位置 行:1 字符: 1
+ Start "/home/panjie/temp/aaa.docx"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process],InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

The first two lines are in Chinese which means Start is error becuase system could not found specified file.

While using relative path is OK, such as wslview ./temp/aaa.docx.

The environment I am using:

  • Windows 10 2004 19041.208
  • WSL2 Ubuntu 18.04

wslview -r not setting default browser

Background Information:

  • Build: 17763
  • WSL: Wlinux
  • Version: v1.9.02

Describe the bug
Looks like wslview -r does nothing, or it's not clear how to proceed

To Reproduce
wslview -r

Expected behavior
should set default browser, so links will open in default windows browser

Additional context
Got this message:

update-alternatives: --install needs <link> <name> <path> <priority>

Use 'update-alternatives --help' for program usage information.
update-alternatives: --install needs <link> <name> <path> <priority>

Quick fix for wslview failing when URL includes &(ampersand)

Background Information:

  • Build: 1809 (OS Build: 17763.437)
  • WSL: Pengwin 1.2.3.0
  • Version: wslu v2.1.1; wslview v06

Describe the bug
When '&' character is included in the target URL, the command fails with following apparent powershell error message:
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.

To Reproduce
From login bash shell:
wslview 'http://www.google.com/search?q=wslu&hl=en'

Expected behavior
The destination URL opens in the Windows default web browser..

Additional context
Above issue in my environment is corrected by following quick fix:

*** wslview.old 2019-04-12 09:00:58.000000000 +0900
--- wslview.new 2019-04-25 22:32:54.237179800 +0900
***************
*** 154,160 ****
  done

  if [[ "$lname" != "" ]]; then
!       winps_exec Start "$lname"
  else
        echo "${error}No input, aborting"
        exit 21
--- 154,160 ----
  done

  if [[ "$lname" != "" ]]; then
!       winps_exec Start "\"$lname\""
  else
        echo "${error}No input, aborting"
        exit 21

wslusc shortcut not working

Background Information:

  • WSL: Ubuntu 18.04
  • Version: 2.3.2-0ubuntu2~18.04.3

When creating a Win shortcut for a GUI Linux program I end up with a shortcut that is not working.

To Reproduce
wslusc --gui pycharm.sh

This results in a shortcut with the following target:

C:\Windows\System32\wscript.exe C:\Users\Marco Brieden\wslu\runHidden.vbs C:\Users\Marco Brieden\AppData\Local\Microsoft\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\ubuntu1804.exe run "cd ~; . /usr/share/wslu/wsl-integration

When opened it gives this error:
"There is no file extension in "C:\Users\Marco"

Additional context
It looks like there are two separate issues:

  1. The space in my username breaks the shortcut.
  2. The max length of the "target" field has been exceeded and the command got cut off.

Wslu cannot handle windows user names containing spaces

Background Information:

  • Build: [e.g. 18362]
  • WSL: [Arch Linux 4.4.0-18362-Microsoft]
  • Version: [ - ]

Describe the bug
When trying to use utilities in the library (which I installed from AUR) the space in my windows user name causes the functionality to break in both wslfetch.sh and wslusc.sh (might be more but these two I tested)
To Reproduce
Steps to reproduce the behavior:
Have username which contains a white space character on windows where you installed

Performance issue due to usage of Powershell

Background Information:

  • Build: 18362 (19h1_release)
  • WSL: Ubuntu 18.04.2 LTS (Ubuntu in Store)
  • Version: wslu 2.0.0, wslfetch v38

Describe the bug
wslfetch takes a long time to display output (I've seen it vary between 7 and 15 seconds). wslsys takes 1.5-3 seconds itself.

To Reproduce
Steps to reproduce the behavior: Just run wslfetch with no parameters (same for wslsys)

Expected behavior
The output should appear more quickly.

Additional context
I initially suspected that it was Powershell being slow but I can't seem to get it to show in my task manager so I may be wrong. You don't call it THAT many times do you?

I will also investigate on a solution myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.