wslutilities / wslu Goto Github PK
View Code? Open in Web Editor NEWA collection of utilities for Windows Subsystem for Linux
Home Page: https://wslutiliti.es/wslu
License: GNU General Public License v3.0
A collection of utilities for Windows Subsystem for Linux
Home Page: https://wslutiliti.es/wslu
License: GNU General Public License v3.0
Background Information:
Microsoft Windows [Version 10.0.18363.752]
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
:
Then, if you resize the window, it shows correctly:
But if then you run it again, it again calculates the columns incorrectly, and overlaps:
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.
Background Information:
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.
Background Information:
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
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.
Otherwise, it will cause a problem in handling the path.
I'm install Arch Linux latest version from https://github.com/yuk7/ArchWSL/releases/latest
(So far everything that works in normal Arch works in this version of ArchWSL except for fakeroot)
Can we add support for ArchWSL in WSLU?
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
Background Information:
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:
sudo nano /etc/wsl.conf
[automount]
the root option to root = /
ls -la /
to see if c
is listed.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.
Background Information:
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.
A copy of the issue from WhitewaterFoundry/Pengwin#536
Is there any roadmap to provide this support for eBPF on WSL?
Background Information:
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.
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
.
https://github.com/wslutilities/wslu/blob/master/src/etc/wsl.ico does not seem to be original work and it is not clear what the license of it and if it is redistributable at all.
Please either clarify the license or replace it in the repository to clear the legal status of the project.
Background Information:
Describe the bug
In /etc/wsl.conf spaces around the = do not work.
This entry in wsl.conf is not recognized correctly:
root = /
This one works:
root=/
Background Information:
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
First picture with "windows interoperability"
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.
Background Information:
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
Background Information:
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.
Background Information:
Describe the bug
The new "baseexec_gen" function, which has to succeed at least once,
To Reproduce
Steps to reproduce the behavior:
wsl --import
wslvar
, wslview
, wslupath
, wslsys
, wslfetch
, wslusc
, and wslsys
are all affected)
find
Expected behavior
A clear and concise description of what you expected to happen.
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.
Background Information:
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.
Background Information:
Describe the bug
This probably happens when linux and windows languages are different
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
Ubuntu version of wslu
is maintained separately. For Ubuntu version of wslu
, You should report bugs here: https://bugs.launchpad.net/ubuntu/+source/wslu
If you don't like to create a launchpad account for reporting the bug, you can report here and I will help transfer the bug to Launchpad.
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
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
A step by step guide command line guiding you to create a shortcut.
WinVer: 1809 - 17763.107
WLinux Latest
See issue WhitewaterFoundry/Pengwin#180
When you go to sign into Azure it has a button that says Copy and Open. This button works on windows and opens the default browser, in WSL it does not.
Use Get-ItemProperty
(e.g. (Get-ItemProperty Registry::HKEY_CLASSES_ROOT\Directory\Background\shell\WLinux\command).'(default)'
) instead of old reg.exe
Background Information:
Describe the bug
When wslusc is executed it creates a link to start the specified command in the default WSL distribution.
To Reproduce
wslusc -g xterm
in the non-default oneExpected behavior
Wslusc should detect which WSL distribution name should the shortcut use to start the command in the right distribution.
When I create shortcuts using wslusc , if pinning them to the taskbar the following occurs:
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:
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
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
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
This would be really dangerous to implement. Apps and files could be corrupt. Under consideration.
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.
Background Information:
Describe the bug
Cannot use wslusc to create a GUI shortcut.
To Reproduce
Steps to reproduce the behavior:
wslusc -g ~/eclipse/eclipse
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
Just a couple of issues to resolve before I can accept it into the repository:
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.
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.
Background Information:
10.0.19041.207
Alpine Linux 3.11.3
wslu v3.0.1-1; wslfetch v44
Describe the bug
It seems that an error in a call to grep fails.
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.
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.`
Background Information:
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!
I have tried this before, and I will try it again. Possibly need to create some helper to identify the current using WSL.
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:
Background Information:
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>
Background Information:
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
Background Information:
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:
Background Information:
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
Background Information:
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.
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.