pax_global_header00006660000000000000000000000064140461646330014521gustar00rootroot0000000000000052 comment=173da54ec9b138c1c5d13dd24398ed1d114024f8 wslu-3.2.3/000077500000000000000000000000001404616463300125205ustar00rootroot00000000000000wslu-3.2.3/.github/000077500000000000000000000000001404616463300140605ustar00rootroot00000000000000wslu-3.2.3/.github/FUNDING.yml000066400000000000000000000002071404616463300156740ustar00rootroot00000000000000# These are supported funding model platforms github: patrick330602 open_collective: wslu custom: ['https://www.paypal.me/callmepk/'] wslu-3.2.3/.github/ISSUE_TEMPLATE/000077500000000000000000000000001404616463300162435ustar00rootroot00000000000000wslu-3.2.3/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000007051404616463300207370ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve --- **Background Information:** - Build: [e.g. 17704] - WSL: [e.g. Ubuntu 16.04] - Version: [e.g. 1.5] **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: **Expected behavior** A clear and concise description of what you expected to happen. **Additional context** Add any other context about the problem here. wslu-3.2.3/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000006041404616463300202330ustar00rootroot00000000000000# https://docs.github.com/en/free-pro-team@latest/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser blank_issues_enabled: true contact_links: - name: "Ubuntu bugs" url: https://bugs.launchpad.net/ubuntu/+source/wslu about: For Ubuntu version, you should not only report bug here but also report bug at Launchpad.wslu-3.2.3/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000015761404616463300176720ustar00rootroot00000000000000 ## Description ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist: - [ ] I have read Code of Conduct and Contributing documentations. - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly.wslu-3.2.3/.github/actions/000077500000000000000000000000001404616463300155205ustar00rootroot00000000000000wslu-3.2.3/.github/actions/rpmbuild/000077500000000000000000000000001404616463300173365ustar00rootroot00000000000000wslu-3.2.3/.github/actions/rpmbuild/Dockerfile000066400000000000000000000006311404616463300213300ustar00rootroot00000000000000# A copy of robertdebock/github-action-rpmbuild because that one don't work FROM centos:8 WORKDIR /github/workspace RUN dnf install -y make tar gzip rpmdevtools dnf-utils spectool dnf-utils && \ dnf clean all && \ rm -r -f /var/cache/* CMD spectool --get-files --all SPECS/*.spec && \ yum-builddep --assumeyes SPECS/*.spec && \ rpmbuild --define '_topdir /github/workspace' -ba SPECS/*.specwslu-3.2.3/.github/actions/rpmbuild/action.yml000066400000000000000000000003021404616463300213310ustar00rootroot00000000000000name: Build an RPM description: Build an RPM. runs: using: docker #image: 'docker://robertdebock/github-action-rpmbuild:centos-7' image: 'Dockerfile' branding: icon: box color: greenwslu-3.2.3/.github/workflows/000077500000000000000000000000001404616463300161155ustar00rootroot00000000000000wslu-3.2.3/.github/workflows/manpage.yml000066400000000000000000000021541404616463300202520ustar00rootroot00000000000000name: Manpage Website Deployment on: push: branches: - master paths: - 'docs/*' jobs: build: name: Manpage Generate runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq groff - name: Convert manpages run: bash -c "for x in docs/*; do groff \$x -mandoc -Thtml > \${x%.*}.html; done" - name: deploy manpages to website env: GH_TOKEN: ${{ secrets.GIT_DEPLOY_KEY }} run: | git config --global user.email "me@patrickwu.space" git config --global user.name "Jinming Wu, Patrick" git clone --depth 1 https://patrick330602:$GH_TOKEN@github.com/wslutilities/wslutilities.github.io.git website mkdir -p ./website/wslu/man cp docs/*.html ./website/wslu/man git --git-dir=./website/.git --work-tree=./website add -A git --git-dir=./website/.git --work-tree=./website commit -m "Manpage update" git --git-dir=./website/.git --work-tree=./website push wslu-3.2.3/.github/workflows/pkgbuild.yml000066400000000000000000000062561404616463300204520ustar00rootroot00000000000000name: Packaging Builds on: push: branches: - develop - dev/** - lts/** jobs: debbuild: name: Debian runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper - name: Build Debian Package run: | bash ./configure.sh --deb buster debuild -i -us -uc -b mkdir -p ./pkgs mv ../wsl*.* ./pkgs - uses: actions/upload-artifact@v1 with: name: DebianDEBs path: pkgs pgwbuild: name: Pengwin runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper - name: Build Debian Package run: | bash ./configure.sh --deb bullseye debuild -i -us -uc -b mkdir -p ./pkgs mv ../wsl*.* ./pkgs - uses: actions/upload-artifact@v1 with: name: PengwinDEBs path: pkgs pgwspdeploy: name: Pengwin Dev version Deploying needs: pgwbuild runs-on: ubuntu-18.04 container: circleci/ruby:2.3-jessie steps: - name: Retrive package for deployment uses: actions/download-artifact@v1 with: name: PengwinDEBs - run: gem install package_cloud - name: deploy to the dev env: PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }} run: package_cloud push whitewaterfoundry/wslu-dev/debian/bullseye ./PengwinDEBs/*.deb --skip-errors rpmbuild: name: RPM runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq build-essential tar - name: run: | bash ./configure.sh --rpm cp extras/build/rpm/wslu.spec ../wslu.spec rm -rf * mkdir -p SOURCES mkdir -p SPECS cp ../wslu-*.tar.gz SOURCES cp ../wslu.spec SPECS - name: rpmbuild uses: ./.github/actions/rpmbuild/ - name: moving files run: | mkdir compiled_rpms cp SRPMS/* compiled_rpms cp RPMS/noarch/* compiled_rpms #uses: robertdebock/rpmbuild-action@1.1.1 - uses: actions/upload-artifact@v1 with: name: RPMs path: compiled_rpms # - name: deploy RPM source to rpm-wslu # env: # GH_TOKEN: ${{ secrets.GIT_DEPLOY_KEY }} # run: | # git config --global user.email "me@patrickwu.space" # git config --global user.name "Jinming Wu, Patrick" # git clone --depth 1 https://patrick330602:$GH_TOKEN@github.com/wslutilities/rpm-wslu.git rpm-repo # git --git-dir=./rpm-repo/.git --work-tree=./rpm-repo add -A # git --git-dir=./rpm-repo/.git --work-tree=./rpm-repo commit -m "RPM Packaging file update: $(date)" # git --git-dir=./rpm-repo/.git --work-tree=./rpm-repo pushwslu-3.2.3/.github/workflows/pkgdeploy.yaml000066400000000000000000000062011404616463300207760ustar00rootroot00000000000000name: Package Deployment on: push: branches: - master jobs: debbuild: name: Debian runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper - name: Build Debian Package run: | bash ./configure.sh --deb buster debuild -i -us -uc -b mkdir -p ./pkgs mv ../wsl*.* ./pkgs - uses: actions/upload-artifact@v1 with: name: DebianDEBs path: pkgs pgwbuild: name: Pengwin runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq apt-utils build-essential gzip devscripts debhelper - name: Build Debian Package run: | bash ./configure.sh --deb bullseye debuild -i -us -uc -b mkdir -p ./pkgs mv ../wsl*.* ./pkgs - uses: actions/upload-artifact@v1 with: name: PengwinDEBs path: pkgs pgwspdeploy: name: Pengwin Deploying needs: pgwbuild runs-on: ubuntu-18.04 container: circleci/ruby:2.3-jessie steps: - name: Retrive package for deployment uses: actions/download-artifact@v1 with: name: PengwinDEBs - run: gem install package_cloud - name: deploy to the dev env: PACKAGECLOUD_TOKEN: ${{ secrets.PGW_DEV_DEPLOY_KEY }} run: package_cloud push whitewaterfoundry/wslu/debian/bullseye ./PengwinDEBs/*.deb --skip-errors rpmbuild: name: RPM runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install Pre-requisites run: | sudo apt-get update -qq sudo apt-get install -qq build-essential tar - name: run: | bash ./configure.sh --rpm cp extras/build/rpm/wslu.spec ../wslu.spec rm -rf * mkdir -p SOURCES mkdir -p SPECS cp ../wslu-*.tar.gz SOURCES cp ../wslu.spec SPECS - name: rpmbuild uses: ./.github/actions/rpmbuild/ - name: moving files run: | mkdir compiled_rpms cp SRPMS/* compiled_rpms cp RPMS/noarch/* compiled_rpms #uses: robertdebock/rpmbuild-action@1.1.1 - uses: actions/upload-artifact@v1 with: name: RPMs path: compiled_rpms # - name: deploy RPM source to rpm-wslu # env: # GH_TOKEN: ${{ secrets.GIT_DEPLOY_KEY }} # run: | # git config --global user.email "me@patrickwu.space" # git config --global user.name "Jinming Wu, Patrick" # git clone --depth 1 https://patrick330602:$GH_TOKEN@github.com/wslutilities/rpm-wslu.git rpm-repo # git --git-dir=./rpm-repo/.git --work-tree=./rpm-repo add -A # git --git-dir=./rpm-repo/.git --work-tree=./rpm-repo commit -m "RPM Packaging file update: $(date)" # git --git-dir=./rpm-repo/.git --work-tree=./rpm-repo pushwslu-3.2.3/.github/workflows/tests.yml000066400000000000000000000005301404616463300200000ustar00rootroot00000000000000name: General Tests on: [push] jobs: generaltests: name: General Tests runs-on: windows-2019 steps: - uses: actions/checkout@v2 - name: Doing nothing run: echo "won't work right now, implement until GitHub action properly support WSL. related issue - https://github.com/actions/virtual-environments/issues/50" wslu-3.2.3/.gitignore000066400000000000000000000002751404616463300145140ustar00rootroot00000000000000# built files out out-docs target # folders requird for build SOURCES SPECS SRPMS RPMS ## Complied packages compiled_rpms pkgs # system and vscode generated files .vscode **/*/.DS_Store wslu-3.2.3/.shellcheckrc000066400000000000000000000000261404616463300151510ustar00rootroot00000000000000disable=SC2154,SC1117 wslu-3.2.3/CODE_OF_CONDUCT.md000066400000000000000000000062161404616463300153240ustar00rootroot00000000000000# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at me@patrickwu.space. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/wslu-3.2.3/CONTRIBUTING.md000066400000000000000000000124631404616463300147570ustar00rootroot00000000000000# Contributing We love pull requests from everyone. By participating in this project, you agree to abide by [Code of Conduct](CODE_OF_CONDUCT.md). ## Code contributions ### Setup Run the following to get started: ```bash git clone --recursive --branch dev/master https://github.com/wslutilities/wslu.git ./configure.sh make sudo make res_install ``` ### Structure ``` wslu |-src | |-etc | | |-wslview.desktop: XDG-style app definition for wslview | | |-wsl.ico: legacy default icon for wslusc | | |-wsl-gui.ico: default icon for wslusc GUI shortcut | | |-wsl-term.ico: default icon for wslusc cli shortcut | | |-sudo.ps1: helper script for wslgsu | | |-get_dpi.ps1: helper script for dpi function in wslsys | | |-wslsc-helper.sh: helper script for wslusc on WSL side | | \-runHidden.vbs: helper script for wslusc on Windows side | |-wslu-header: Header file of all script | \-.sh: Components of script |-tests: location for script tests \-extras |-bats: testing utility |-scripts: scripts \-build |-debian: files for building .deb |-rpm: files for building .rpm |-arch: files for building Arch Linux packages \-alpine: files for building Alpine Linux packages ``` ### configure.sh `configure.sh` is the script to complete some preprocessing task for both developing and packaging building. Following parameter is available for developing: - `-e, --env` -- Environment Check, check whether it is using Fake WSL Environment, normal Linux or WSL. - `-p, --prsh` -- Check Status of `powershell.exe`. - `-P, --pkg` -- Install Needed Packages required by your system for building. Following parameter is available for package building: - `--build` -- helper to add the version to wslu header. - `--deb ` -- preprocessing script for deb packages.`` should be version code name like `bionic`, `stable`, `kali-rolling` or `buster`. - `--rpm` -- preprocessing script for rpm packages. ### Build & Install run `make` to build executables to `out` folder and manages to `out-docs` folder. run `make doc` to build manpage only. run `make clean` to remove `out` and `out-docs` folder. run `make test` to run tests. run `make install` to install. run `make res_install` to install just resources. run `make uninstall` to uninstall. run `cd extras/scripts && ./builder-docs.sh` to build docs to `gendocs`. Pass necessary environment variables if necessary. The default installation is in `/usr` folder: - `DESTDIR`: You can change the destination installation folder. It is empty by default. - `PREFIX`: You can change the prefix for where to install. It is `/usr` by default. ### Test `wslu` use [bats](https://github.com/bats-core/bats-core) for testing. Please refer to [its guide](https://github.com/bats-core/bats-core#writing-tests) to write tests. ### Push Requests Make sure that the codes changed are tested. Then create Pull requests [here](https://github.com/wslutilities/wslu/compare). ## Financial contributions We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/wslu). Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. ### Contributors Thank you to all the people who have already contributed to wslu! ### Backers Thank you to all our backers! [[Become a backer](https://opencollective.com/wslu#backer)] ### Sponsors Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/wslu#sponsor)) wslu-3.2.3/LICENSE000066400000000000000000001045151404616463300135330ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . wslu-3.2.3/Makefile000066400000000000000000000040051404616463300141570ustar00rootroot00000000000000AUTOMAKE_OPTIONS = foreign DESTDIR ?= PREFIX ?= /usr HEADER = src/wslu-header OUTPATH = out MANPATH = docs OUTMANPATH = out-docs CURPATH = $(shell pwd) SOURCES := $(wildcard src/*.sh) ETCFILES := $(wildcard src/etc/*) OUTFILES := $(wildcard out/*) MANFILES := $(wildcard docs/*) INSTEDEXES := $(wildcard $(DESTDIR)$(PREFIX)/bin/wsl*) INSTEDMANOS := $(wildcard $(DESTDIR)$(PREFIX)/share/man/man1/wsl*) DATETMP = $(shell date +%Y-%m-%d) VERTMP = $(shell cat ./VERSION) all: doc [ -d $(OUTPATH) ] || mkdir $(OUTPATH) sed -e s/VERSIONPLACEHOLDER/"$(VERTMP)"/g $(HEADER) > $(HEADER).tmp; \ for file in $(SOURCES); do \ cat $(HEADER).tmp $$file > $(OUTPATH)/`basename $$file`; \ mv $(OUTPATH)/`basename $$file` $(OUTPATH)/`basename $$file .sh`; \ done rm $(HEADER).tmp chmod +x $(OUTPATH)/* install: doc_install res_install install -Dm 755 out/* -t $(DESTDIR)$(PREFIX)/bin uninstall: for f in $(INSTEDEXES); do \ rm -f $$f; \ done for f in $(INSTEDMANOS); do \ rm -f $$f; \ done rm -rf $(DESTDIR)$(PREFIX)/share/man/man7/wslu.7.gz rm -rf $(DESTDIR)$(PREFIX)/share/wslu doc: [ -d $(OUTMANPATH) ] || mkdir $(OUTMANPATH) for file in $(MANFILES); do \ cp $$file $(OUTMANPATH); \ sed -e 's/DATEPLACEHOLDER/'$(DATETMP)'/' -e 's/VERSIONPLACEHOLDER/'$(VERTMP)'/' $(OUTMANPATH)/`basename $$file` > $(OUTMANPATH)/`basename $$file`.tmp; \ mv $(OUTMANPATH)/`basename $$file`.tmp $(OUTMANPATH)/`basename $$file`; \ gzip -f -q $(OUTMANPATH)/`basename $$file`; \ done doc_install: install -Dm 644 out-docs/*.1.gz -t $(DESTDIR)$(PREFIX)/share/man/man1 install -Dm 644 out-docs/*.7.gz -t $(DESTDIR)$(PREFIX)/share/man/man7 res_install: install -Dm 644 src/etc/*.vbs -t $(DESTDIR)$(PREFIX)/share/wslu install -Dm 644 src/etc/*.ps1 -t $(DESTDIR)$(PREFIX)/share/wslu install -Dm 644 src/etc/*.ico -t $(DESTDIR)$(PREFIX)/share/wslu install -Dm 755 src/etc/*.sh -t $(DESTDIR)$(PREFIX)/share/wslu install -Dm 644 src/etc/*.desktop $(DESTDIR)$(PREFIX)/share/wslu clean: rm -rf $(OUTPATH) rm -rf $(OUTMANPATH) test: bats -r tests wslu-3.2.3/README.eo.md000066400000000000000000000147571404616463300144170ustar00rootroot00000000000000
# wslu - kolekto de utilaĵoj por WSL [![GitHub permesilo](https://img.shields.io/github/license/wslutilities/wslu?style=flat-square&label=permesilo&color=blue&logo=github)](https://github.com/wslutilities/wslu/blob/master/LICENSE) [![GitHub (pre-)release](https://img.shields.io/github/v/release/wslutilities/wslu?include_prereleases&label=eldono&logo=github&style=flat-square)](https://github.com/wslutilities/wslu) [![GitLab](https://img.shields.io/static/v1?label=gitlab&logo=gitlab&color=E24329&message=spegulita&style=flat-square)](https://gitlab.com/wslutilities/wslu) [![Launchpad](https://img.shields.io/static/v1?label=launchpad&logo=launchpad&color=F8C300&message=spegulita&style=flat-square)](https://launchpad.net/wslu) [![Gitee](https://img.shields.io/static/v1?label=gitee&color=C71D23&message=spegulita&style=flat-square)](https://gitee.com/mirrors/wslu) [![Twitter Sekvo](https://img.shields.io/twitter/follow/wslutilities?style=flat-square&logo=twitter&color=1DA1F2&label=sekvi)](https://twitter.com/wslutilities) [English](README.md) | [简体中文](README.hans.md) | [繁體中文](README.hant.md) | Esperanto
> This is still a beta translation. I am still learning Esperanto, so there will be mistakes. Estas kolekto de utilaĵoj por Vindoza Subsistemo por Linukso (Windows Subsystem for Linux, WSL), kiel ricevi Vindozajn medivariablojn aŭ krei viajn plej ŝatatajn Linuksajn Grafikinterfacajn aplikaĵojn ŝparvojojn sur Vindoza labortablo. Deviĝi Vindozo 10 1703; Iom de funkciojn deviĝas pli alian version de Vindozo 10; Ankaŭ subteni WSL2. ## Funkcioj **wslusc** WSL ŝparvoja kreinto kiu kreas ŝparvojo sur via Vindoza labortablo. **wslsys** WSL sistema informa presilo kiu presilas sistemajn informojn el Vindozo 10 aŭ WSL. **wslfetch** WSL ekrankopia informa ilo kiu presilas informojn elegante. **wslvar** WSL ilo por helpi vin ricevi Vindozajn sistemajn medivariablojn. **wslview** *Kun simbola ligilo `wview/wslstart/wstart`* Falsa WSL retumilo/foliumilo kiu povas helpi vin malfermi ligilojn en via defaŭlta Vindoza retumilon aŭ malfermi dosierojn sur Vindozo. **wslupath** *⚠ Evitinda* WSL ilo kiu konvertas dosierindikojn. **wslact** Aro de rapidaj agoj por WSL, kiel repide surmeti ĉiujn Vindozajn diskingojn aŭ mane sinkronigi tempon inter Vindozo kaj WSL. ## Instalo ### Alpine Linux Oni povas instali `wslu` el **Alpine Linux 3.12+** per la jenaj komandoj: ``` sudo apk add wslu ``` ### Arch Linux [wslu](https://aur.archlinux.org/packages/wslu/) kaj [wslu-git](https://aur.archlinux.org/packages/wslu-git/) sur AUR. ### CentOS/RHEL Aldonu la deponejon por la respondanta Linuksa distribuo: - **CentOS 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_7/home:wslutilities.repo` - **CentOS 8**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_8/home:wslutilities.repo` - **Red Hat Enterprise Linux 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/RHEL_7/home:wslutilities.repo` Tiam instalu per la komando `sudo yum install wslu`. ### Debian Oni povas instali `wslu` per la jenaj komandoj: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/debian buster main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Fedora Remix Oni povas instali `wslu` el **COPR** per la jenaj komandoj: ``` sudo dnf copr enable wslutilities/wslu sudo dnf install wslu ``` ### Kali Linux Oni povas instali `wslu` per la jenaj komandoj: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/kali kali-rolling main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Pengwin Antaŭinstalita. ### Pengwin Enterprise Oni povas instali `wslu` per la jenaj komandoj: ``` sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/ScientificLinux_7/home:wslutilities.repo sudo yum install wslu ``` ### Ubuntu > Attenu! > > Por Ubuntu versio, Oni devas ne nur raporti cimojn ĉi tie sed ankaŭ raporti cimojn ĉe [Launchpad](https://bugs.launchpad.net/ubuntu/+source/wslu). Antaŭinstalita en la plej freŝa versio. Sur pli aĝaj instaloj de Ubuntu, oni povas instali `ubuntu-wsl` kiu dependas de `wslu`: ``` sudo apt update sudo apt install ubuntu-wsl ``` Por instali la plej freŝan version antaŭ ol `wslu` atigas `main` deponejon, vi povas instali per nia PPA: ### OpenSUSE Oni povas instali `wslu` per la jenaj komandoj: ``` sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/openSUSE_Leap_15.1/home:wslutilities.repo sudo zypper up sudo zypper in wslu ``` ### SUSE Linux Enperprise Server Oni povas instali `wslu` per la jenaj komandoj: ``` SLESCUR_VERSION="$(grep VERSION= /etc/os-release | sed -e s/VERSION=//g -e s/\"//g -e s/-/_/g)" sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/SLE_$SLESCUR_VERSION/home:wslutilities.repo sudo zypper addrepo https://download.opensuse.org/repositories/graphics/SLE_12_SP3_Backports/graphics.repo sudo zypper up sudo zypper in wslu ``` ### Aliaj Distribuoj > **⚠ Ne Rekomendu** > > La maniero `curl | bash` estas ne sekura. [Rilata atikolo (La angla)](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) Oni povas instali `wslu` per la jenaj komandoj sur via preferata distribuoj: `curl -sL https://raw.githubusercontent.com/wslutilities/wslu/master/extras/scripts/wslu-install | bash` ## Kontributanoj Dankon por ĉiuj homoj kiu kontribuas kaj helpas ĉi tiu projekto ekzisti. [ [Kontribui](CONTRIBUTING.md) ]. ## Permesilo & Agnosko Ĉi tiu projekto uzas [GPLv3](LICENSE) Permesilo. Emblemo de WSL Utilities kaj bildsimboloj por `wslusc` estas disponebla laŭ la permesilo [Krea Komunaĵo Atribuite 4.0 Tutmonda](http://creativecommons.org/licenses/by/4.0/). Por aliaj uzataj dosieroj kaj havaĵoj de ekstera liveranto, bonvolu rilatu al [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE). wslu-3.2.3/README.hans.md000066400000000000000000000141071404616463300147320ustar00rootroot00000000000000
# wslu - 一套 Windows 10 Linux 子系统工具组 [![GitHub license](https://img.shields.io/github/license/wslutilities/wslu?style=flat-square&label=许可协议&color=blue&logo=github)](https://github.com/wslutilities/wslu/blob/master/LICENSE) [![GitHub (pre-)release](https://img.shields.io/github/v/release/wslutilities/wslu?include_prereleases&label=版本&logo=github&style=flat-square)](https://github.com/wslutilities/wslu) [![GitLab](https://img.shields.io/static/v1?label=gitlab&logo=gitlab&color=E24329&message=已镜像&style=flat-square)](https://gitlab.com/callmepk/wslu) [![Launchpad](https://img.shields.io/static/v1?label=launchpad&logo=launchpad&color=F8C300&message=已镜像&style=flat-square)](https://launchpad.net/wslu) [![码云](https://img.shields.io/static/v1?label=码云&color=C71D23&message=已镜像&style=flat-square)](https://gitee.com/mirrors/wslu) [![Twitter Follow](https://img.shields.io/twitter/follow/wslutilities?style=flat-square&logo=twitter&color=1DA1F2&label=关注) ](https://twitter.com/wslutilities) [English](README.md) | 简体中文 | [繁體中文](README.hant.md) | [Esperanto](README.eo.md)
这是一套适用于 Windows 10 Linux 子系统的工具组,可以在 Windows 10 Linux 子系统下完成诸如获取 Windows 环境变量或者创建你最喜爱的 Linux 程序桌面快捷方式等工作。 需要 Windows 10 创造者更新;部分功能需要更高版本的Windows 10;支持 WSL2。 ## 功能 **wslusc** 用于创建 Linux 程序的 Windows 桌面快捷方式的 WSL 工具。 **wslsys** 展示 Windows 和 WSL 下系统信息的 WSL 工具。 **wslfetch** 类似于 screenfetch 的 WSL 系统信息展示工具。 **wslvar** 可以帮助你获取 Windows 系统环境变量的 WSL 工具。 **wslview** **拥有别名 `wview/wslstart/wstart`** 虚拟 WSL 浏览器,可以通过其在 Windows 默认网络浏览器打开链接或在 Windows 里打开 WSL 下的文件。 **wslupath** *⚠ 已弃用* 可以转换不同路径类型的 WSL 工具。 **wslact** 一组 WSL 快速动作,如快速挂载所有硬盘或手动与 Windows 同步时间。 ## 安装 ### Alpine Linux 你可以用以下命令从 **Alpine Linux 3.12+** 安装 `wslu`: ``` sudo apk add wslu ``` ### Arch Linux AUR 上的 [wslu](https://aur.archlinux.org/packages/wslu/) 和 [wslu-git](https://aur.archlinux.org/packages/wslu-git/)。 ### CentOS/RHEL 为相应的发行版添加仓库: - **CentOS 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_7/home:wslutilities.repo` - **CentOS 8**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_8/home:wslutilities.repo` - **Red Hat Enterprise Linux 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/RHEL_7/home:wslutilities.repo` 然后用以下命令 `sudo yum install wslu` 安装 `wslu`。 ### Debian 你可以用以下命令安装 `wslu`: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/debian buster main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Fedora Remix 你可以用以下命令从 `COPR` 安装 `wslu`: ``` sudo dnf copr enable wslutilities/wslu sudo dnf install wslu ``` ### Kali Linux 你可以用以下命令安装 `wslu`: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/kali kali-rolling main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Pengwin 已预装。 ### Pengwin Enterprise 你可以用以下命令安装 `wslu`: ``` sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/ScientificLinux_7/home:wslutilities.repo sudo yum install wslu ``` ### Ubuntu > 注意! > > Ubuntu 版本不仅需要在此反馈, 同时也要在 [Launchpad](https://bugs.launchpad.net/ubuntu/+source/wslu) 反馈。 最新版本已预装。针对旧版本的安装,请安装依赖于 wslu 的 ubuntu-wsl: ``` sudo apt update sudo apt install ubuntu-wsl ``` 在最新版 `wslu` 进入 `main` 仓库前,请从以下 PPA 安装: ### OpenSUSE 你可以用以下命令安装 `wslu`: ``` sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/openSUSE_Leap_15.1/home:wslutilities.repo sudo zypper up sudo zypper in wslu ``` ### SUSE Linux Enperprise Server 你可以用以下命令安装 `wslu`: ``` SLESCUR_VERSION="$(grep VERSION= /etc/os-release | sed -e s/VERSION=//g -e s/\"//g -e s/-/_/g)" sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/SLE_$SLESCUR_VERSION/home:wslutilities.repo sudo zypper addrepo https://download.opensuse.org/repositories/graphics/SLE_12_SP3_Backports/graphics.repo sudo zypper up sudo zypper in wslu ``` ### 其他发行版 > **⚠ 不建议** > > `curl | bash` 这种方法并不安全。 [相关文章](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) 在你想要安装的发行版下运行以下命令:`curl -sL https://raw.githubusercontent.com/wslutilities/wslu/master/extras/scripts/wslu-install | bash` ## 贡献者 没有你们,这个项目不可能存在。[[为这项目作出贡献](CONTRIBUTING.md)]。 ## 许可及版权 本项目使用 [GPLv3](LICENSE) 许可协议。 WSL Utilities 的图标及 `wslusc` 桌面快捷方式采用[知识共享署名-非商业性使用 4.0 国际许可协议](http://creativecommons.org/licenses/by-nc/4.0/)进行许可。 对于使用的第三方文件与资源,请参照 [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE)。 wslu-3.2.3/README.hant.md000066400000000000000000000141121404616463300147270ustar00rootroot00000000000000
# wslu - 一套 Windows 10 Linux 子系統工具組 [![GitHub license](https://img.shields.io/github/license/wslutilities/wslu?style=flat-square&label=授權條款&color=blue&logo=github)](https://github.com/wslutilities/wslu/blob/master/LICENSE) [![GitHub (pre-)release](https://img.shields.io/github/v/release/wslutilities/wslu?include_prereleases&label=版本&logo=github&style=flat-square)](https://github.com/wslutilities/wslu) [![GitLab](https://img.shields.io/static/v1?label=gitlab&logo=gitlab&color=E24329&message=已映象&style=flat-square)](https://gitlab.com/callmepk/wslu) [![Launchpad](https://img.shields.io/static/v1?label=launchpad&logo=launchpad&color=F8C300&message=已映象&style=flat-square)](https://launchpad.net/wslu) [![碼雲](https://img.shields.io/static/v1?label=碼雲&color=C71D23&message=已映象&style=flat-square)](https://gitee.com/mirrors/wslu) [![Twitter Follow](https://img.shields.io/twitter/follow/wslutilities?style=flat-square&logo=twitter&color=1DA1F2&label=跟隨) ](https://twitter.com/wslutilities) [English](README.md) | [简体中文](README.hans.md) | 繁體中文 | [Esperanto](README.eo.md)
這是一套適用於 Windows 10 Linux 子系統的工具組,可以在 Windows 10 Linux 子系統下完成諸如獲取 Windows 環境變數或者建立你最喜愛的 Linux 程式桌面捷徑等工作。 需要 Windows 10 創造者更新;部分功能需要更高版本的Windows 10;支援 WSL2。 ## 功能 **wslusc** 用於建立 Linux 程式的 Windows 桌面捷徑的 WSL 工具。 **wslsys** 展示 Windows 和 WSL 下系統資訊的 WSL 工具。 **wslfetch** 類似於 screenfetch 的 WSL 系統資訊展示工具。 **wslvar** 可以幫助你獲取 Windows 系統環境變數的 WSL 工具。 **wslview** **擁有別名 `wview/wslstart/wstart`** 虛擬 WSL 瀏覽器,可以通過其在 Windows 預設網路瀏覽器開啟連結或在 Windows 裡開啟 WSL 下的檔案。 **wslupath** *⚠ 已棄用* 可以轉換不同路徑類型的 WSL 工具。 **wslact** 一組 WSL 快捷動作,如快速掛載所有硬碟或手動與 Windows 同步時間。 ## 安装 ### Alpine Linux 你可以用以下指令通過 **Alpine Linux 3.12+** 安裝 `wslu`: ``` sudo apk add wslu ``` ### Arch Linux AUR 上的 [wslu](https://aur.archlinux.org/packages/wslu/) 和 [wslu-git](https://aur.archlinux.org/packages/wslu-git/)。 ### CentOS/RHEL 為相應的發行版新增倉庫: - **CentOS 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_7/home:wslutilities.repo` - **CentOS 8**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_8/home:wslutilities.repo` - **Red Hat Enterprise Linux 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/RHEL_7/home:wslutilities.repo` 然後用以下指令 `sudo yum install wslu` 安裝 `wslu`。 ### Debian 你可以用以下指令安裝 `wslu`: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/debian buster main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Fedora Remix 你可以用以下指令通過 `COPR` 安裝 `wslu`: ``` sudo dnf copr enable wslutilities/wslu sudo dnf install wslu ``` ### Kali Linux 你可以用以下指令安装 `wslu`: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/kali kali-rolling main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Pengwin 已預載。 ### Pengwin Enterprise 你可以用以下指令安装 `wslu`: ``` sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/ScientificLinux_7/home:wslutilities.repo sudo yum install wslu ``` ### Ubuntu > 注意! > > Ubuntu 版本的 `wslu` 為修改版。你需要在[此](https://bugs.launchpad.net/ubuntu/+source/wslu)對 Ubuntu 版問題進行反饋。 最新版本已預載。針對舊版本的安裝,請安裝依賴於 wslu 的 ubuntu-wsl: ``` sudo apt update sudo apt install ubuntu-wsl ``` 在最新版 `wslu` 進入 `main` 倉庫前,請從以下 PPA 安裝: ### OpenSUSE 你可以用以下指令安装 `wslu`: ``` sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/openSUSE_Leap_15.1/home:wslutilities.repo sudo zypper up sudo zypper in wslu ``` ### SUSE Linux Enperprise Server 你可以用以下指令安装 `wslu`: ``` SLESCUR_VERSION="$(grep VERSION= /etc/os-release | sed -e s/VERSION=//g -e s/\"//g -e s/-/_/g)" sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/SLE_$SLESCUR_VERSION/home:wslutilities.repo sudo zypper addrepo https://download.opensuse.org/repositories/graphics/SLE_12_SP3_Backports/graphics.repo sudo zypper up sudo zypper in wslu ``` ### 其他發行版 > **⚠ 不建議** > > `curl | bash` 這種方法並不安全。 [相關文章](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) 在你想要安裝的發行版下執行以下指令:`curl -sL https://raw.githubusercontent.com/wslutilities/wslu/master/extras/scripts/wslu-install | bash` ## 貢獻者 沒有你們,這個項目不可能存在。[[為這項目作出貢獻](CONTRIBUTING.md)]。 ## 授權及版權 本項目使用 [GPLv3](LICENSE) 授權條款。 WSL Utilities 的圖示及 `wslusc` 桌面快捷方式係採用[創用 CC 姓名標示-非商業性 4.0 國際 授權條款](http://creativecommons.org/licenses/by-nc/4.0/)授權。 對於使用的第三方檔案與資源,請參照 [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE)。 wslu-3.2.3/README.md000066400000000000000000000141771404616463300140110ustar00rootroot00000000000000
# wslu - A collection of utilities for WSL [![GitHub license](https://img.shields.io/github/license/wslutilities/wslu?style=flat-square&label=license&color=blue&logo=github)](https://github.com/wslutilities/wslu/blob/master/LICENSE) [![GitHub (pre-)release](https://img.shields.io/github/v/release/wslutilities/wslu?include_prereleases&logo=github&style=flat-square)](https://github.com/wslutilities/wslu) [![GitLab](https://img.shields.io/static/v1?label=gitlab&logo=gitlab&color=E24329&message=mirrored&style=flat-square)](https://gitlab.com/wslutilities/wslu) [![Launchpad](https://img.shields.io/static/v1?label=launchpad&logo=launchpad&color=F8C300&message=mirrored&style=flat-square)](https://launchpad.net/wslu) [![Gitee](https://img.shields.io/static/v1?label=gitee&color=C71D23&message=mirrored&style=flat-square)](https://gitee.com/mirrors/wslu) [![Twitter Follow](https://img.shields.io/twitter/follow/wslutilities?style=flat-square&logo=twitter&color=1DA1F2&label=follow)](https://twitter.com/wslutilities) English | [简体中文](README.hans.md) | [繁體中文](README.hant.md) | [Esperanto](README.eo.md)
This is a collection of utilities for Windows 10 Linux Subsystem, such as retrieving Windows 10 environment variables or creating your favorite Linux GUI application shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update; Some of the feature requires a higher version of Windows 10; Supports WSL2. ## Feature **wslusc** A WSL shortcut creator to create a shortcut on your Windows 10 Desktop. **wslsys** A WSL system information printer to print out system informations from Windows 10 or WSL. **wslfetch** A WSL screenshot information tool to print information in an elegant way. **wslvar** A WSL tool to help you get Windows system environment variables. **wslview** *With alias `wview/wslstart/wstart`* A fake WSL browser that can help you open link in default Windows browser or open files on Windows. **wslupath** *⚠ Deprecated* A WSL tool to convert path styles. **wslact** A set of quick actions for WSL such as quickly mounting all drives or manually sync time between Windows and WSL. ## Installation ### Alpine Linux You can install `wslu` on **Alpine Linux 3.12+** with the following command: ``` sudo apk add wslu ``` ### Arch Linux > AUR version of `wslu` is pulled due to that it violated its policy. Download the latest package from release and install using the command: `sudo pacman -U *.zst` ### CentOS/RHEL Add the repository for the corresponding Linux distribution: - **CentOS 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_7/home:wslutilities.repo` - **CentOS 8**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/CentOS_8/home:wslutilities.repo` - **Red Hat Enterprise Linux 7**: `sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/RHEL_7/home:wslutilities.repo` Then install with the command `sudo yum install wslu`. ### Debian You can install `wslu` with the following command: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/debian buster main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Fedora ``` sudo dnf copr enable wslutilities/wslu sudo dnf install wslu ``` ### Fedora Remix Preinstalled. ### Kali Linux You can install `wslu` with the following command: ``` sudo apt install gnupg2 apt-transport-https wget -O - https://access.patrickwu.space/wslu/public.asc | sudo apt-key add - echo "deb https://access.patrickwu.space/wslu/kali kali-rolling main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` ### Pengwin Preinstalled. ### Pengwin Enterprise You can install `wslu` with the following command: ``` sudo yum install wslu ``` ### Ubuntu > Attention! > > For Ubuntu version, you should not only report bug here but also report bug at [Launchpad](https://bugs.launchpad.net/ubuntu/+source/wslu). Preinstalled in the latest apps. On older installations of Ubuntu please install `ubuntu-wsl` that depends on `wslu`: ``` sudo apt update sudo apt install ubuntu-wsl ``` To install the latest version before `wslu` reaches `main` reporsitory, you can install via our PPA: ### OpenSUSE You can install `wslu` with the following command: ``` sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/openSUSE_Leap_15.1/home:wslutilities.repo sudo zypper up sudo zypper in wslu ``` ### SUSE Linux Enperprise Server You can install `wslu` with the following command: ``` SLESCUR_VERSION="$(grep VERSION= /etc/os-release | sed -e s/VERSION=//g -e s/\"//g -e s/-/_/g)" sudo zypper addrepo https://download.opensuse.org/repositories/home:/wslutilities/SLE_$SLESCUR_VERSION/home:wslutilities.repo sudo zypper addrepo https://download.opensuse.org/repositories/graphics/SLE_12_SP3_Backports/graphics.repo sudo zypper up sudo zypper in wslu ``` ### Other distributions > **⚠ Not Recommend** > > `curl | bash` method is not secure. [Related article](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) You can install `wslu` with the following command on your preferred distribution: `curl -sL https://raw.githubusercontent.com/wslutilities/wslu/master/extras/scripts/wslu-install | bash` ## Contributors This project exists thanks to all the people who contribute. [ [Contribute](CONTRIBUTING.md) ]. ## License & Credits This project uses [GPLv3](LICENSE) License. Logo of WSL Utilities and icons for `wslusc` desktop shortcuts are licensed under [CC BY 4.0 International License](http://creativecommons.org/licenses/by/4.0/). For other third party files and assets used, please refer to [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE). wslu-3.2.3/THIRD_PARTY_LICENSE000066400000000000000000001127121404616463300154420ustar00rootroot00000000000000./src/etc/sudo.ps1 ================== The sudo.ps1 used here is a part of psutils[^1] made by Luke Sampson. the file is used under MIT License (License A). /src/etc/wsl.ico ================== Tux logo used here was originally made by Larry Ewing in the Gimp and re-illustrated in vector by Garrett LeSage, using Inkscape. /src/wslfetch.sh ================== Some of `wslfetch` ASCII Arts comes from neofetch[^2] with MIT License (License B) and screenFetch[^3] with GPLv3 License (License C). Pengwin Logo used in `wslfetch` ASCII art is ASCII version of the artwork by Dennis D. Bednarz[^4], with use permission from Whitewater Foundry. WLinux Logo used in `wslfetch` ASCII art is ASCII version of the artwork by Larry Ewing. Reference Link ================== ^1: https://github.com/lukesampson/psutils/ ^2: https://github.com/dylanaraps/neofetch/ ^3: https://github.com/KittyKatt/screenFetch/ ^4: https://twitter.com/DennisBednarz License A ------------------ The MIT License (MIT) Copyright (c) 2017 Luke Sampson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License B ------------------ The MIT License (MIT) Copyright (c) 2016-2018 Dylan Araps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License C ------------------ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . wslu-3.2.3/VERSION000066400000000000000000000000101404616463300135570ustar00rootroot000000000000003.2.3-1 wslu-3.2.3/appveyor.yml000066400000000000000000000007231404616463300151120ustar00rootroot00000000000000version: 3.0.0.{build} only_commits: files: - src/**/* - Makefile - appveyor.yml - tests/* image: Visual Studio 2019 build: Script clone_folder: C:\project\wslu install: - git submodule update --init --recursive - ps: wsl -u root apt-get update - ps: wsl -u root DEBIAN_FRONTEND=noninteractive apt-get install -y bc make imagemagick gzip groff build_script: - ps: wsl make - ps: wsl -u root make install test_script: - ps: wsl make test wslu-3.2.3/configure.sh000066400000000000000000000062361404616463300150440ustar00rootroot00000000000000#!/bin/bash # configure.sh # configure script for wslu # # Copyright (C) 2019 Patrick Wu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . function env_check { if [ -f /etc/fake-wsl-release ] then echo "[fake WSL Environment]" elif [ ! -f /proc/sys/fs/binfmt_misc/WSLInterop ] then echo "Your distro do not support WSL Interopability. Installation Aborted." exit 1 fi } function pkg_inst { distro="$(head -n1 /etc/os-release | sed -e 's/NAME=\"//g')" case $distro in *Pengwin*) sudo dpkg --force-depends --remove wslu sudo apt install -y git gzip make ;; *WLinux*|Ubuntu*|*Debian*|*Kali*) sudo apt purge -y wslu sudo apt install -y git bc gzip make imagemagick ;; openSUSE*|SLES*) sudo zypper -n rm wslu sudo zypper -n install git bc gzip make imagemagick ;; Alpine*) sudo apk add git bc gzip make bash-completion imagemagick ;; Arch*) sudo pacman -Syyu git bc gzip make bash-completion imagemagick ;; *Oracle*|Scientific*) sudo yum install -y git bc gzip make bash-completion imagemagick ;; *Fedora*) sudo dnf install -y git bc gzip make bash-completion ImageMagick ;; *Generic*) [ "fedora" == "$(grep -e "LIKE=" /etc/os-release | sed -e 's/ID_LIKE=//g')" ] && sudo dnf install -y git || exit 1;; *) exit 1;; esac } function main_inst { env_check pkg_inst make sudo make DESTDIR=/usr install } function general_build_prep { sed -i s/VERSIONPLACEHOLDER/"$(cat ./VERSION)"/g ./src/wslu-header } function deb_build_prep { mkdir -p ./debian cp -r ./extras/build/debian/* ./debian chmod +x ./debian/rules sed -i s/DISTROPLACEHOLDER/"$@"/g ./debian/changelog sed -i s/VERSIONPLACEHOLDER/"$(cat ./VERSION)"/g ./debian/changelog sed -i s/DATETIMEPLACEHOLDER/"$(date +'%a, %d %b %Y %T %z')"/g ./debian/changelog #dch --distribution $@ --newversion "$(cat ./VERSION)" } function rpm_build_prep { BUILD_VER_NUM=$(cat ./VERSION | cut -f1 -d-) REL_VER_NUM=$(cat ./VERSION | cut -f2 -d-) sed -i s/BUILDVERPLACEHOLDER/"$BUILD_VER_NUM"/g ./extras/build/rpm/wslu.spec sed -i s/RELVERPLACEHOLDER/"$REL_VER_NUM"/g ./extras/build/rpm/wslu.spec sed -i s/DATETIMEPLACEHOLDER/"$(date +'%a %b %d %Y')"/g ./extras/build/rpm/wslu.spec mkdir -p ../wslu-$BUILD_VER_NUM/ cp -r * ../wslu-$BUILD_VER_NUM/ cd ../ tar -czvf wslu-$BUILD_VER_NUM.tar.gz ./wslu-$BUILD_VER_NUM cd ./wslu } for args; do case $args in --build) general_build_prep; exit;; --rpm) rpm_build_prep; exit;; --deb) deb_build_prep $2; exit;; -e|--env) env_check; exit;; -P|--pkg) pkg_inst; exit;; -i|--install) main_inst; exit;; *) exit 1;; esac done env_check; pkg_inst wslu-3.2.3/docs/000077500000000000000000000000001404616463300134505ustar00rootroot00000000000000wslu-3.2.3/docs/wslact.1000066400000000000000000000033621404616463300150330ustar00rootroot00000000000000.TH "WSLACT" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslact - Component of Windows 10 Linux Subsystem Utility .SH SYNOPSIS .B wslact .RB COMMAND .I ... .SH DESCRIPTION A set of quick actions for WSL such as creating startup tasks and manually sync time between Windows and WSL. .PP Currently, we have two features available: .in +4n .nf \fBts, time-sync\fR \- Time Sync \fBsm, auto-mount\fR \- Auto Mounting .fi .in .SH COMMANDS .SS "Time Sync" Time Sync (\fItime-sync\fR) feature allows user to manually sync time from Windows to WSL. Sometime, when you have network issues, WSL time will be slower than the Windows time. This tool is designed for this situation. Requires sudo. .TP SYNOPSIS .B wslact time-sync .RB [ \-h ] .TP OPTIONS .nf .B -h, --help .in +4n print a simple help. .in .fi .SS "Auto Mounting" Smart Mounting (\fIauto-mount\fR) feature allows you to mount all drives available on Windows to WSL. Requires sudo. .TP SYNOPSIS .B wslact auto-mount .RB [ \-h ] .TP OPTIONS .nf .B -m, --mount-options .in +4n pass a list of options you want to pass to \fImount\fR command. .in .fi .nf .B -h, --help .in +4n print a simple help. .in .fi .SH OPTIONS .TP .B -h, --help print a simple help. .TP .B -v, --version print current version. .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslu(7)wslu-3.2.3/docs/wslfetch.1000066400000000000000000000021411404616463300153470ustar00rootroot00000000000000.TH "WSLFETCH" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslfetch - Component of Windows 10 Linux Subsystem Utility .SH SYNOPSIS .B wslfetch .RB [ \-hvlsc ] .SH DESCRIPTION This is a WSL Screenshot Information Tool to print information in a elegant way. .SH OPTIONS .TP .B -h, --help print a simple help. .TP .B -v, --version print current version. .TP .B -l, --line print a separate line before and after .TP .B -s, --splash use wslfetch as splash when startup; add 'wslfetch --splash' to the end of the rc file .TP .B -c, --colorbar add a colorbar to the printed information. .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslsys(1), wslu(7)wslu-3.2.3/docs/wslsys.1000066400000000000000000000051031404616463300150750ustar00rootroot00000000000000.TH "WSLSYS" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslsys - Component of Windows 10 Linux Subsystem Utility .SH SYNOSIS .B wslsys .RB [ \-VIbBFUWRKPSlt ] .RB [ \-s ] .PP .B wslsys .RB [ \-hv ] .SH DESCRIPTION This is a WSL system information printer to print out some basic system information. .SH OPTIONS .PP Executing command without options will print out the all system information. add \fB-s\fR flag to print only value: .TP .B -h, --help Print a simple help. .TP .B -v, --version Print current version. .TP .B -V, --wsl-version Print the the WSL version your current distribution is using. For example, \fB"1"\fR for using WSL 1st generation. .TP .B -I, --sys-installdate Print the time when the current release is installed. The format is in Hex Unix Timestamp. For example, \fB"0x5df84068"\fR. .TP .B -b, --branch Print current release branch of your Windows 10. For example, \fB"rs_prerelease"\fR means you are on rs_prerelease realease branch. .TP .B -B, --build Print current build version of your Windows 10. For example, \fB"19536"\fR means you are using Winows 10 build 19536. .TP .B -F, --full-build Print current build version of your Windows 10 in long form. For example, \fB"19536.1000.amd64fre.rs_prerelease.191211-1446"\fR. .TP .B -U, --uptime Print current uptime inside WSL. For example, \fB"0d 0h 2m"\fR. .TP .B -W, --win-uptime Print current uptime in Windows 10. For example, \fB"0d 12h 8m"\fR. .TP .B -R, --release Print the current release for your WSL distro. For example, \fB"Ubuntu 18.04.3 LTS"\fR. .TP .B -K, --kernel Print the current version of the WSL kernel. For example, \fB"Linux 4.19.81-microsoft-standard"\fR. .TP .B -P, --package Print total number of installed packages. For example, \fB"1047"\fR for 1047 packages installed. .TP .B -S, --display-scaling Print the current disply scaling from your display setting. For example, \fB"2"\fR for 200% scaling. .TP .B -l, --locale Print the Windows locale information. For example, \fB"en-US"\fR for English (United States). .TP .B -t, --win-theme Print the Windows 10 Theme. For example, \fB"light"\fR. .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslu(7)wslu-3.2.3/docs/wslu.7000066400000000000000000000047441404616463300145430ustar00rootroot00000000000000.TH "WSLU" "7" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslu - a collection of utilities for Windows 10 Linux Subsystem .SH DESCRIPTION This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. Some features require Windows 10 May 2019 Update or later. .SH AVAILABLE COMMANDS wslusc, wslsys, wslfetch, wslvar, wslview(wview/wslstart/wstart), wslupath(deprecated), wslact .PP check each manpage to see the detailed usage. .SH SUPPORTED DISTRIBUTION .nf - Debian GNU/Linux - Kali Linux - OpenSUSE Leap 42, 12.0 and 15.0 - SUSE Linux Enterprise Server 12 and 15 - Ubuntu Latest, 16.04 LTS, 18.04 LTS and 20.04 LTS - Pengwin(Formerly WLinux) .fi .SS .B Community Supported Distro .nf - Arch Linux via ArchWSL - Alpine Linux via AlpineWSL or Alpine WSL - Scientific Linux, Oracle Linux* or RedHat Enterprise Linux** via Pengwin Enterprise (Formerly WLinux Enterprise) - Fedora via Fedora Remix for WSL .B *: Will support in the future. .B **: you need to request to using RHEL from Pengwin team and have a license of RHEL of your own. .fi .PP > Legacy Ubuntu is no longer supported. .SH OPTIONS All WSL Utilities command shared a common header. the following option are available to all commands. .TP .B --debug Entering debug mode. .TP .B --verbose Entering verbose mode. .SH EXIT STATUS .TP .B 1 general error/unknown error. .TP .B 20 input is empty or invalid. .TP .B 21 input is empty. .TP .B 22 input is invalid. .TP .B 30 file do not exist. .TP .B 31 folder do not exist. .TP .B 32 feature not implemented. .TP .B 33 required component do not exist. .TP .B 34 unsupported feature (for a distro) .TP .B 40 Unknown system input. .SH BUG Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Logo of WSL Utilities and wslusc icons is licensed under CC BY 4.0 International License. For third-party license, please refer to .wslu-3.2.3/docs/wslupath.1000066400000000000000000000040211404616463300153760ustar00rootroot00000000000000.TH "WSLUPATH" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities" .SH NAME wslupath(DEPRECATED) - Component of Windows 10 Linux Subsystem Utility .SH SYNOPSIS .B wslupath .RB [ \-dOr ] .RB [\-D|\-A|\-T|\-S|\-W|\-s|\-su|\-H|\-P|\|\.\|\.\|\.NAME\|\.\|\.\|\.]\fR .PP \Bwslupath .RB [\-h|\-v|\-R] .SH DESCRIPTION This is a WSL Windows path Converter that can convert Windows path to other styles of path\. .SH COMMANDS .SS Output Type Options Without a type, it will detect path style automatically. .TP .B -O, --original print original (Windows) form of path(C:\eWindows\eSystem32) .TP .B -d, --doubledash-dir print Windows form of path with double backslash(C:\e\eWindows\e\eSystem32) .TP .B -r, --reg-data use the registry data to print path[wslpath \-R to know more] .SS System Path .B -D, --desktop print desktop path and exit .TP .B -A, --appdata print AppData path(%APPDATA%) and exit .TP .B -T, --temp print temp path(%TMP%) and exit .TP .B -S, --sysdir print system path and exit .TP .B -W, --windir print Windows path and exit .TP .B -s, --start-menu print Start Menu path and exit .TP .B -su, --startup print Startup path and exit .TP .B -H, --home print user home path (%HOMEPATH%) and exit .TP .B -P, --program-files print Program Files path (%ProgramFiles%) and exit .SS Other Options .TP .B -h, --help print a simple help .TP .B -v, --version print current version .TP .B -R, --avail-reg print available registry input .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .PP .B However, keep in mind this tool is deprecated and bugs reported for this tool will have a high chance to be ignored. .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslvar(1), wslu(7)wslu-3.2.3/docs/wslusc.1000066400000000000000000000026631404616463300150610ustar00rootroot00000000000000.TH "WSLUSC" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslusc - Component of Windows 10 Linux Subsystem Utility .SH SYNOPSIS .B wslusc .RB [ \-gi ] .RB [ \-e .IR PATH ] .RB [ \-n .IR NAME ] .RB [ \-i .IR FILE ] .I COMMAND .PP .B wslusc .RB [ \-hv ] .SH DESCRIPTION This is a WSL shortcut creator to create shortcut on Windows Desktop. .SH OPTIONS .TP .B -h, --help print a simple help .TP .B -v, --version print current version .TP .B -g, --gui create a shortcut that links to a GUI application .TP .B -i, --icon add an icon to the Windows Shortcut. Supports \fB\.ico\fR/\fB\.png\fR/\fB\.svg\fR\. .TP .B -n, --name add a different name other than the command name. .TP .B -e, --env add a custom environment to your command. For example, if you want HiDPI support for a GTK app, add \fBexport GDK_SCALE=2;\fR in your command, like this: \fBwslusc ... \-e "export GDK_SCALE=2;" ...\fR .TP .B -I, --interactive interactive mode. .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslu(7)wslu-3.2.3/docs/wslvar.1000066400000000000000000000023001404616463300150430ustar00rootroot00000000000000.TH "WSLVAR" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslvar - Component of Windows 10 Linux Subsystem Utility .SH SYNOPSIS .B wslvar .RB [ \-sl ] .I NAME .PP .B wslvar .RB [\-hvSL ] .SH DESCRIPTION This is a WSL tool to help you get Windows system environment variables. .SH OPTIONS .SS "Output Type Options" .B -s, --sys use data from system local & global variables. .TP .B -l, --shell use data from Shell folder environment variables. .SS "Other Options" .TP .B -h, --help print a simple help. .TP .B -v, --version print current version. .TP .B -S, --getsys show available system local & global variables. .TP .B -L, --getshell show available Shell folder environment variables. .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslu(7)wslu-3.2.3/docs/wslview.1000066400000000000000000000023341404616463300152340ustar00rootroot00000000000000 .TH "WSLVIEW" "1" "DATEPLACEHOLDER" "VERSIONPLACEHOLDER" "WSL Utilities User Manual" .SH NAME .B wslview, wview, wslstart, wstart - Component of Windows 10 Linux Subsystem Utility .SH SYNOPSIS .B wslview, wview, wslstart, wstart .RB [ \-hvur ] .PP .B wslview, wview, wslstart, wstart .I LINK/FILE .SH DESCRIPTION This is a file viewer on WSL that allows you to open files and folders from WSL in Windows and a fake web browser that allows opening urls in your default browser on Windows 10. .SH OPTIONS .TP .B -h, --help print a simple help. .TP .B -v, --version print current version. .TP .B -u, --unreg-as-browser remove \fBwslview\fR as the default WSL web browser. .TP .B -r, --reg-as-browser register \fBwslview\fR as the default WSL web browser. .SH AUTHOR Created by Patrick Wu .SH REPORTING BUGS Report bugs to ; For Ubuntu specific/related bugs, report to . .SH COPYRIGHT This is free software; you can redistribute it and/or modify it under the terms of the GNU GPL version 3 or (at your option) any later version. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO wslu(7)wslu-3.2.3/extras/000077500000000000000000000000001404616463300140265ustar00rootroot00000000000000wslu-3.2.3/extras/build/000077500000000000000000000000001404616463300151255ustar00rootroot00000000000000wslu-3.2.3/extras/build/alpine/000077500000000000000000000000001404616463300163755ustar00rootroot00000000000000wslu-3.2.3/extras/build/alpine/APKBUILD000066400000000000000000000013251404616463300175140ustar00rootroot00000000000000# Maintainer: Patrick Wu # Contributor: Patrick Wu pkgname=wslu pkgver=3.2.3 pkgrel=0 pkgdesc="A collection of utilities for Windows 10 Linux Subsystems" url="https://github.com/wslutilities/wslu" arch="noarch" license="GPL-3.0-or-later" depends="bc bash-completion imagemagick grep" #the builtin grep have issues with wslu subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/wslutilities/wslu/archive/v$pkgver.tar.gz" options="!check" #tests can be only be run on WSL(Windows Subsystems for Linux) version of Alpine Linux environment, hence disabled build() { make } check() { make test } package() { make DESTDIR="$pkgdir" install } sha512sums="" wslu-3.2.3/extras/build/alpine/wslu.post-install000066400000000000000000000001141404616463300217360ustar00rootroot00000000000000#!/bin/sh date +"%s" | tee /usr/share/wslu/updated_time >/dev/null exit 0 wslu-3.2.3/extras/build/alpine/wslu.post-upgrade000066400000000000000000000001141404616463300217170ustar00rootroot00000000000000#!/bin/sh date +"%s" | tee /usr/share/wslu/updated_time >/dev/null exit 0 wslu-3.2.3/extras/build/alpine/wslu.pre-deinstall000066400000000000000000000000521404616463300220510ustar00rootroot00000000000000#!/bin/sh rm /usr/share/wslu/updated_timewslu-3.2.3/extras/build/arch/000077500000000000000000000000001404616463300160425ustar00rootroot00000000000000wslu-3.2.3/extras/build/arch/PKGBUILD000066400000000000000000000011051404616463300171630ustar00rootroot00000000000000# Maintainer: Patrick Wu pkgname=wslu pkgver=3.2.3 pkgrel=0 pkgdesc="A collection of utilities for Windows 10 Linux Subsystems" arch=('any') url='https://github.com/wslutilities/wslu' license=('GPL-3.0-or-later') depends=('bc' 'imagemagick' 'bash-completion') source=("git+https://github.com/wslutilities/wslu.git#tag=v${pkgver}") sha256sums=('SKIP') build() { cd wslu bash ./configure.sh --build make } package() { cd wslu make DESTDIR="${pkgdir}" install install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/wslu/ } # vim: ts=2 sw=2 et: wslu-3.2.3/extras/build/arch/wslu.install000066400000000000000000000014361404616463300204300ustar00rootroot00000000000000# This is a default template for a post-install scriptlet. # Uncomment only required functions and remove any functions # you don't need (and this header). ## arg 1: the new package version #pre_install() { # do something here #} ## arg 1: the new package version post_install() { date +"%s" | tee /usr/share/wslu/updated_time >/dev/null } ## arg 1: the new package version ## arg 2: the old package version #pre_upgrade() { # do something here #} ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { date +"%s" | tee /usr/share/wslu/updated_time >/dev/null } ## arg 1: the old package version pre_remove() { # do something here rm /usr/share/wslu/updated_time } ## arg 1: the old package version #post_remove() { # do something here #}wslu-3.2.3/extras/build/debian/000077500000000000000000000000001404616463300163475ustar00rootroot00000000000000wslu-3.2.3/extras/build/debian/changelog000066400000000000000000000003241404616463300202200ustar00rootroot00000000000000wslu (VERSIONPLACEHOLDER) DISTROPLACEHOLDER; urgency=medium * Please check https://github.com/wslutilities/wslu/releases/latest for changelog -- Jinming Wu, Patrick DATETIMEPLACEHOLDER wslu-3.2.3/extras/build/debian/compat000066400000000000000000000000031404616463300175460ustar00rootroot0000000000000011 wslu-3.2.3/extras/build/debian/control000066400000000000000000000012531404616463300177530ustar00rootroot00000000000000Source: wslu Section: utils Priority: optional Maintainer: Jinming Wu, Patrick Build-Depends: debhelper (>= 11), gzip, make Standards-Version: 4.1.3 Homepage: https://wslutiliti.es/wslu Vcs-Browser: https://github.com/wslutilities/wslu Vcs-Git: https://github.com/wslutilities/wslu.git Package: wslu Architecture: all Depends: bc, imagemagick, desktop-file-utils Description: A collection of utilities for Windows 10 Linux Subsystem This is a collection of utilities for Windows 10 Linux Subsystem, such as converting WSL path to Windows path or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. wslu-3.2.3/extras/build/debian/copyright000066400000000000000000000014761404616463300203120ustar00rootroot00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: wslu Source: https://github.com/wslutilities/wslu Files: * Copyright: 2020 Patrick Wu License: /usr/share/common-licenses/GPL-3 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .wslu-3.2.3/extras/build/debian/links000066400000000000000000000004331404616463300174120ustar00rootroot00000000000000usr/bin/wslview usr/bin/wview usr/bin/wslview usr/bin/wslstart usr/bin/wslview usr/bin/wstart usr/share/man/man1/wslview.1.gz usr/share/man/man1/wview.1.gz usr/share/man/man1/wslview.1.gz usr/share/man/man1/wslstart.1.gz usr/share/man/man1/wslview.1.gz usr/share/man/man1/wstart.1.gzwslu-3.2.3/extras/build/debian/postinst000066400000000000000000000006751404616463300201650ustar00rootroot00000000000000#!/bin/sh set -e #DEBHELPER# if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 30 update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 30 date +"%s" | tee /usr/share/wslu/updated_time >/dev/null fi desktop-file-install --dir=/usr/share/applications /usr/share/wslu/wslview.desktop update-desktop-database wslu-3.2.3/extras/build/debian/prerm000066400000000000000000000006661404616463300174270ustar00rootroot00000000000000#!/bin/sh set -e #DEBHELPER# if [ "$1" = "remove" ] ; then update-alternatives --remove x-www-browser /usr/bin/wslview update-alternatives --remove www-browser /usr/bin/wslview if [ -f /usr/share/wslu/updated_time ]; then rm /usr/share/wslu/updated_time fi if [ -f /usr/share/applications/wslview.desktop ]; then rm /usr/share/applications/wslview.desktop update-desktop-database fi fi wslu-3.2.3/extras/build/debian/rules000066400000000000000000000004261404616463300174260ustar00rootroot00000000000000#!/usr/bin/make -f %: dh $@ override_dh_auto_test: if (test -f /proc/sys/fs/binfmt_misc/WSLInterop && grep -q enabled /proc/sys/fs/binfmt_misc/WSLInterop); then \ dh_auto_test ; \ else \ echo "Skipping tests; tests can be only run on WSL with WSLInterop enabled"; \ fiwslu-3.2.3/extras/build/debian/source/000077500000000000000000000000001404616463300176475ustar00rootroot00000000000000wslu-3.2.3/extras/build/debian/source/format000066400000000000000000000000141404616463300210550ustar00rootroot000000000000003.0 (quilt) wslu-3.2.3/extras/build/rpm/000077500000000000000000000000001404616463300157235ustar00rootroot00000000000000wslu-3.2.3/extras/build/rpm/wslu.spec000066400000000000000000000053101404616463300175700ustar00rootroot00000000000000%define packager Jinming Wu, Patrick Summary: Windows 10 Linux Subsystem Utilities Name: wslu Version: BUILDVERPLACEHOLDER Release: RELVERPLACEHOLDER Source: wslu-BUILDVERPLACEHOLDER.tar.gz BuildArch: noarch PreReq: desktop-file-utils Requires: bc ImageMagick Requires(post): %{_sbindir}/update-alternatives %{_bindir}/update-desktop-database %{_bindir}/desktop-file-install Requires(postun): %{_sbindir}/update-alternatives %{_bindir}/update-desktop-database BuildRoot: %{_tmppath}/%{name}-%{version}-build URL: https://github.com/wslutilities/wslu/ License: GPL-3.0-or-later %description This is a collection of utilities for Windows 10 Linux Subsystem, such as converting WSL path to Windows path or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. %prep %setup -q %build make %install # for os <= 7 mkdir -p %{?buildroot}/usr/share/man/man1/ mkdir -p %{?buildroot}/usr/share/man/man7/ mkdir -p %{?buildroot}/usr/share/wslu/ mkdir -p %{?buildroot}/usr/bin/ # normal part make PREFIX=/usr DESTDIR=%{?buildroot} install ln -sf /usr/bin/wslview %{?buildroot}/usr/bin/wview ln -sf /usr/bin/wslview %{?buildroot}/usr/bin/wslstart ln -sf /usr/bin/wslview %{?buildroot}/usr/bin/wstart ln -sf /usr/share/man/man1/wslview.1.gz %{?buildroot}/usr/share/man/man1/wview.1.gz ln -sf /usr/share/man/man1/wslview.1.gz %{?buildroot}/usr/share/man/man1/wslstart.1.gz ln -sf /usr/share/man/man1/wslview.1.gz %{?buildroot}/usr/share/man/man1/wstart.1.gz %post %{_sbindir}/update-alternatives --install %{_bindir}/www-browser www-browser %{_bindir}/wslview 1 %{_sbindir}/update-alternatives --install %{_bindir}/x-www-browser x-www-browser %{_bindir}/wslview 1 date +"%s" | tee /usr/share/wslu/updated_time >/dev/null desktop-file-install --dir=/usr/share/applications /usr/share/wslu/wslview.desktop update-desktop-database %postun if [ -f /usr/share/wslu/updated_time ]; then rm /usr/share/wslu/updated_time fi if [ -f /usr/share/applications/wslview.desktop ]; then rm /usr/share/applications/wslview.desktop update-desktop-database fi %{_sbindir}/update-alternatives --remove www-browser %{_bindir}/wslview %{_sbindir}/update-alternatives --remove x-www-browser %{_bindir}/wslview %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/wslusc %{_bindir}/wslfetch %{_bindir}/wslsys %{_bindir}/wslupath %{_bindir}/wslview %{_bindir}/wview %{_bindir}/wstart %{_bindir}/wslstart %{_bindir}/wslact %{_bindir}/wslvar /usr/share/wslu/ %doc /usr/share/man/ %changelog * DATETIMEPLACEHOLDER Jinming Wu, Patrick - BUILDVERPLACEHOLDER-RELVERPLACEHOLDER - Please check https://github.com/wslutilities/wslu/releases/latest for changelog wslu-3.2.3/extras/icon.png000066400000000000000000000460621404616463300154740ustar00rootroot00000000000000PNG  IHDR!tEXtSoftwareAdobe ImageReadyqe<KIDATxAW&tz ڣP5X +V,z3OoGz rQyodDRU6YY7"sN,@˾營~z-_nh#rt|&_,p᧟}ytR]*@C>.YU&~9!UB{VSR!jJ+`>ݞݞʂ&L«YOYXw*x^ǣ}{XO?}yzEA]vh)`7&*WVQi% vkbg]\ @d]&~9녫 w/Dw<^"Ă`MqxJK3%j  fH03zb7KЦ @' m'b%z?GUKӧA?s6xh%֖V7M՘~yu}<]3 M aC~̻ s_Rtޖ ^ Þk_(-8໅+1_,L v-s#i\=̕ +U«/9`|<_X v0)5DLGZv + B2]xNSmeN˕` ZuգWochߎ?9,vϯC8zwhTB7GW_1X~ţ۝*+]=.Vc=?==}4c%s6]{x!'x!ߕſ;|_| Y3"6|_nw[| h5zp`A65= ,T\yС.lߛ?~~ヶWzI`=:qs}?1,خrP6!%z:cwXzvh ,؞\y[xZB;}, &@bLhr!!j #탿𸩼by=^:aXc>sMGKXo~ 뺲 i ̀u`07o4DW_|WJ\g͖ 6』^= ` 9Uޛ!麳pA1j 67RIPlD6B@X0M,FYHe,+ WؔO Y`LslT2l ڷ#LVn Go GӢ}`;,ua X0-`kl %ت}K,+]$k ].%,$M`4M`4M`4M`4M`4M`4M`4M`4M`4M`4MК+W,ܹStߏ?.?n`X4˗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xf֖فn/}/.p*DT`8Q V^RĩaCx]e*{>!ZIаX#nm$֬ X[&`1'eVy #_wCf$`B;e'RA M @4 h, XD&`Swpp@,`NOO aM @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4k<'F}, X#8;ܿq-zָ<;q-zֈ.Ύ;\K;#6k|Gl WFvqv\$&`excW\^~h$` V]XoM,  "`|"O&V$L HG _vR]/&̝s;0sV8 ;"0gV#D,`\F3"`5?kaX 8;ܯg/:vqv[)<2 `]eڑ0`j8;^\+I&櫐UCwdMgTG %?__^kjWVwy;2b/zǤD?4u~6,l;&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h, XD&`M @4 h,hF!`̯F0 qjk$?4~(uwmد]c.Q8Bm91Qwh,h{Ʊ08BlO:4qXО_g [9B`[uԉW ڳӯߌ`kmz߯}cظyu!F`|v`A>k6~ø,hnXla X66z}A=?`1d@կ~([Qd Wva=2 x֯1`v;~CGaλe5 [;KccL/3y`0 êO*^սWFIVSO<4\Lp3U,. `=m( X0m"1~hX0{2d0So[!ˣnvnyY($` # Copyright (C) 2019 Patrick Wu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . BUILD_DIR=`mktemp --tmpdir --directory wslu-install.XXXX` distro="$(cat /etc/os-release | head -n1 | sed -e 's/NAME=\"//g')" case $distro in *WLinux*|Ubuntu*|*Debian*|*Kali*) sudo apt install -y git;; openSUSE*|SLES*) sudo zypper -n install git;; Alpine*) sudo apk add git;; Arch*) sudo pacman -Syyu git;; Scientific*) sudo yum install -y git;; *Fedora*) sudo dnf install -y git;; *Generic*) [ "fedora" == "$(cat /etc/os-release | grep -e "LIKE=" | sed -e 's/ID_LIKE=//g')" ] && sudo dnf install -y git || exit 1;; *) exit 1;; esac git clone https://github.com/wslutilities/wslu $BUILD_DIR cd $BUILD_DIR bash configure.sh make sudo make install sudo install -m755 extras/scripts/wslu-uninstall /usr/bin rm -rf $BUILD_DIR echo -e "\e[32m## wslu installation complete. To uninstall, run 'wslu-uninstall'\033(B\033[m" wslu-3.2.3/extras/scripts/wslu-uninstall000066400000000000000000000017531404616463300204470ustar00rootroot00000000000000#!/bin/bash # # wslu-uninstall # uninstall script for wslu # # Copyright (C) 2019 Patrick Wu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . for f in /usr/bin/wsl*; do sudo rm -f $f; done for f in /usr/share/man/man1/wsl*; do sudo rm -f $f; done sudo rm -f /usr/share/man/man7/wsl* sudo rm -rf /usr/share/wslu echo -e "\e[32m## wslu uninstallation complete.\033(B\033[m"wslu-3.2.3/src/000077500000000000000000000000001404616463300133075ustar00rootroot00000000000000wslu-3.2.3/src/etc/000077500000000000000000000000001404616463300140625ustar00rootroot00000000000000wslu-3.2.3/src/etc/get_dpi.ps1000066400000000000000000000015351404616463300161260ustar00rootroot00000000000000# Credit: Peter Hinchley via https://hinchley.net/articles/get-the-scaling-rate-of-a-display-using-powershell/ Add-Type @' using System; using System.Runtime.InteropServices; using System.Drawing; public class DPI { [DllImport("gdi32.dll")] static extern int GetDeviceCaps(IntPtr hdc, int nIndex); public enum DeviceCap { VERTRES = 10, DESKTOPVERTRES = 117 } public static float scaling() { Graphics g = Graphics.FromHwnd(IntPtr.Zero); IntPtr desktop = g.GetHdc(); int LogicalScreenHeight = GetDeviceCaps(desktop, (int)DeviceCap.VERTRES); int PhysicalScreenHeight = GetDeviceCaps(desktop, (int)DeviceCap.DESKTOPVERTRES); return (float)PhysicalScreenHeight / (float)LogicalScreenHeight; } } '@ -ReferencedAssemblies 'System.Drawing.dll' [Math]::round([DPI]::scaling(), 2) * 100wslu-3.2.3/src/etc/runHidden.vbs000066400000000000000000000007261404616463300165230ustar00rootroot00000000000000' Method provided by Tobias J by https://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window If WScript.Arguments.Count >= 1 Then ReDim arr(WScript.Arguments.Count-1) For i = 0 To WScript.Arguments.Count-1 Arg = WScript.Arguments(i) If InStr(Arg, " ") > 0 Then Arg = """" & Arg & """" arr(i) = Arg Next RunCmd = Join(arr) CreateObject("Wscript.Shell").Run RunCmd, 0, True End Ifwslu-3.2.3/src/etc/sudo.ps1000066400000000000000000000040201404616463300154550ustar00rootroot00000000000000Set-StrictMode -Off; if(!$args) { "usage: sudo "; exit 1 } function is_admin { return ([System.Security.Principal.WindowsIdentity]::GetCurrent().UserClaims | ? { $_.Value -eq 'S-1-5-32-544'}) } function sudo_do($parent_pid, $dir, $cmd) { $src = 'using System.Runtime.InteropServices; public class Kernel { [DllImport("kernel32.dll", SetLastError = true)] public static extern bool AttachConsole(uint dwProcessId); [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] public static extern bool FreeConsole(); }' $kernel = add-type $src -passthru $kernel::freeconsole() $kernel::attachconsole($parent_pid) $p = new-object diagnostics.process; $start = $p.startinfo $start.filename = "powershell.exe" $start.arguments = "-noprofile $cmd`nexit `$lastexitcode" $start.useshellexecute = $false $start.workingdirectory = $dir $p.start() $p.waitforexit() return $p.exitcode } function serialize($a, $escape) { if($a -is [string] -and $a -match '\s') { return "'$a'" } if($a -is [array]) { return $a | % { (serialize $_ $escape) -join ', ' } } if($escape) { return $a -replace '[>&]', '`$0' } return $a } if($args[0] -eq '-do') { $null, $dir, $parent_pid, $cmd = $args $exit_code = sudo_do $parent_pid $dir (serialize $cmd) exit $exit_code } if(!(is_admin)) { [console]::error.writeline("sudo: you must be an administrator to run sudo") exit 1 } $a = if ($args[0] -eq '-please' -or $args[0] -eq '-plz') { Get-History -Count 1 | select -ExpandProperty CommandLine } else { serialize $args $true } $wd = serialize (convert-path $pwd) # convert-path in case pwd is a PSDrive $savetitle = $host.ui.rawui.windowtitle $p = new-object diagnostics.process; $start = $p.startinfo $start.filename = "powershell.exe" $start.arguments = "-noprofile & '$pscommandpath' -do $wd $pid $a`nexit `$lastexitcode" $start.verb = 'runas' $start.windowstyle = 'hidden' try { $null = $p.start() } catch { exit 1 } # user didn't provide consent $p.waitforexit() $host.ui.rawui.windowtitle = $savetitle exit $p.exitcode wslu-3.2.3/src/etc/wsl-gui.ico000066400000000000000000000144661404616463300161600ustar00rootroot00000000000000 PNG  IHDR\rfIDATxYpUգZ!@@yPeRQ V~{>t߮޿ d L"( Af p OTR>gZkDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDbi?iH_H]9.ҧ6a zGa ' o>gZOp8| ~' _?sXg_"+u5( E`u#B鸃P1?YMַxWH_8 G `05&& ́(0{5'p@H_HD$w )%fIIG`^H P$0HS$0HS$0HS$0HS$0HS$0ȳ oq1 3VsM`eW${U<@']j/'&qIE 0tn~&3%ϕÇoo؎PN`B%.nD/XH}< `ă GC3[ ɶ0`8~ _2|X/ǁ x]+"p&:%q5 i^ 1$ |dt-n7@VOLg' b9j$^k=Y0˅:c ģa˽X'N.;FM<`5mΑ>0H`-|<`7" >x iHS$0HS$0HS$0HS$0HE~G>Oxg 8r q\,pA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 U81kkhs0a'wΖe۴%~.FIEn#p Mشj}sƕ#zZ3xXL$z EG]r_ww)f"Z׷aMۮ#=CoQ:amz[҃+DC̳Wd&{fAZlit[$OiMӜ6JiK^Pn4_AMw{+ǔXȵs?vې96G7+=Q~gۦ86qt%]Z&rhxTX@WoOw ˲H,6<'ZnDF葟RǶTuYOd-xUp{MNI2P&@&@&@`>)!ıwͣ}RBc6I !HZGĄGд|xlOLqt#Q0ώ !lہc!)(_3-&enΒŰB/j@`s@44R'J 1jlM_ 'Zo?!! Ј.>I0" qd-LLLLLLLLLLLLLLl<s3 3z&d΄#H3 16|&8_΄#x2߉6rr#YwbGM]ű9Γy (}5~mnw| o^70.iY@+ EsqV0xG@p.p&ayq~No}8 / H~? b,B/B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!BunOxIIENDB`wslu-3.2.3/src/etc/wslusc-helper.sh000066400000000000000000000022761404616463300172220ustar00rootroot00000000000000#!/bin/bash # # wslusc-helper.sh # WSL Environment Control for WSL Shortcut Generator # # Copyright (C) 2019 Patrick Wu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . if [[ -n $WSL_INTEROP ]]; then # enable external x display for WSL 2 wsl2_d_tmp="$(grep nameserver /etc/resolv.conf | awk '{print $2}')" export DISPLAY=${wsl2_d_tmp}:0 unset wsl2_d_tmp else export DISPLAY=:0 fi win_sys_scaling=$(wslsys -S -s) export GDK_SCALE=$win_sys_scaling export QT_SCALE_FACTOR=$win_sys_scaling export GDK_DPI_SCALE=1 [ "$1" = "--no-cmd-mode" ] && exit 0 cd ~ || exit bash -l -c "$*"wslu-3.2.3/src/etc/wslview.desktop000066400000000000000000000003571404616463300171620ustar00rootroot00000000000000[Desktop Entry] Name=WSLView Comment=Open files and addresses in Windows Icon=windows Exec=/usr/bin/wslview %U Terminal=false Type=Application Categories=Utility; MimeType=x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/file wslu-3.2.3/src/wslact.sh000066400000000000000000000054131404616463300151430ustar00rootroot00000000000000# shellcheck shell=bash version="03" help_short="wslact COMMAND ..." function time_sync { local help_short="wslact time-sync [-h]" while [ "$1" != "" ]; do case "$1" in -h|--help) help "wslact" "$help_short"; exit;; *) shift;; esac done if [ "$EUID" -ne 0 ]; then error_echo "\`wslact time-sync\` requires you to run as root. Aborted." 1 fi echo "${info} Before Sync: $(date +"%d %b %Y %T %Z")" if date -s "$(winps_exec "Get-Date -UFormat \"%m/%d/%Y %T %Z\"" | tr -d "\r")" >/dev/null; then echo "${info} After Sync: $(date +"%d %b %Y %T %Z")" echo "${info} Manual Time Sync Complete." else error_echo "Time Sync failed." 1 fi } function auto_mount { local help_short="wslact auto-mount [-mh]" local mntpt_prefix="$(interop_prefix)" local sysdrv_prefix="$(sysdrive_prefix)" mount_opt="" while [ "$1" != "" ]; do case "$1" in -m|--mount-options) shift; mount_opt="$1"; shift;; -h|--help) help "wslact" "$help_short"; exit;; *) shift;; esac done if [ "$EUID" -ne 0 ]; then error_echo "\`wslact auto-mount\` requires you to run as root. Aborted." 1 fi drive_list="$("$mntpt_prefix$sysdrv_prefix"/WINDOWS/system32/fsutil.exe fsinfo drives | tail -1 | tr '[:upper:]' '[:lower:]' | tr -d ':\\' | sed -e 's/drives //g' -e 's|'$sysdrv_prefix' ||g' -e 's|\r||g' -e 's| $||g' -e 's| |\n|g')" if [ -n "$mount_opt" ]; then echo "${info} Custom mount option detected: $mount_opt" elif [ -f /etc/wsl.conf ]; then tmp="$(grep ^options /etc/wsl.conf | sed -r -e 's|^options[ ]+=[ ]+||g' -e 's|^"||g' -e 's|"$||g')" if [ "$tmp" != "" ]; then echo "${info} Custom mount option detected: $tmp" mount_opt="$tmp" unset tmp fi fi mount_s=0 mount_f=0 mount_j=0 for drive in $drive_list; do [[ -d "$mntpt_prefix$drive" ]] || mkdir -p "$mntpt_prefix$drive" if [[ -n $(find "$mntpt_prefix$drive" -maxdepth 0 -type d -empty 2>/dev/null) ]]; then echo "${info} Mounting Drive ${drive^} to $mntpt_prefix$drive..." if mount -t drvfs ${drive}: "$mntpt_prefix$drive" -o "$mount_opt" 2>/dev/null; then echo "${info} Mounted Drive ${drive^} to $mntpt_prefix$drive." mount_s=$((mount_s + 1)) else echo "${error} Failed to mount Drive ${drive^}. Skipped." mount_f=$((mount_f + 1)) fi else echo "${warn} Already mounted Drive ${drive^} at $mntpt_prefix$drive. Skipped." mount_j=$((mount_j + 1)) fi done echo "${info} Auto mounting completed. $mount_s drive(s) succeed. $mount_f drive(s) failed. $mount_j drive(s) skipped." } while [ "$1" != "" ]; do case "$1" in am|auto-mount|sm|smart-mount) auto_mount "$@"; exit;; ts|time-sync) time_sync "$@"; exit;; -h|--help) help "$0" "$help_short"; exit;; -v|--version) echo "wslu v$wslu_version; wslact v$version"; exit;; *) error_echo "Invalid Input. Aborted." 22;; esac donewslu-3.2.3/src/wslfetch.sh000066400000000000000000000503701404616463300154670ustar00rootroot00000000000000# shellcheck shell=bash version=44 is_line=0 is_splash=0 is_color=0 help_short="wslfetch [-hvlsc]" for args; do case $args in -h|--help) help "$0" "$help_short"; exit;; -v|--version) echo "wslu v$wslu_version; wslfetch v$version"; exit;; -s|--splash) is_splash=1;; -l|--line) is_line=1;; -c|--colorbar) is_color=1; esac done hostname=$(&1 | sed -e 's|\r||g' | grep -B1 -e "$WSL_DISTRO_NAME$" | head -n1 ) if "$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "$wslu_distro_regpath" /v Flags &>/dev/null; then wslu_distro_version=$("$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "$wslu_distro_regpath" /v Flags | tail -n 2 | head -n 1 | sed -e 's|\r||g') wslu_distro_version=${wslu_distro_version##* } wslu_distro_version_processed=$(expr $(printf "%d\n" "$wslu_distro_version") / 8) if [ "$wslu_distro_version_processed" == "1" ]; then echo "2" elif [ "$wslu_distro_version_processed" == "0" ]; then echo "1" fi else echo "1" fi else echo "1" fi } release="$(grep "PRETTY_NAME=" /etc/os-release | sed -e 's/PRETTY_NAME=//g' -e 's/"//g')" kernel="$( # Copyright (C) 2019 Patrick Wu # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Version wslu_version=VERSIONPLACEHOLDER # Speed up script by not using unicode. LC_ALL=C LANG=C # prevent bash -x set +x # checking interopability grep enabled /proc/sys/fs/binfmt_misc/WSLInterop >/dev/null || (echo "WSL Interopability is disabled. Please enable it before using WSL."; exit 1) # when --verbose, verbose; when --debug, debug. # # They should not exist at the same time, otherwise # the output would be too messy. wslu_debug=0 if [ "$1" == "--verbose" ]; then echo -e '\e[38;5;202m\033[1m[verbose] Showing verbose output. \033(B\033[m' shift set -x elif [ "$1" == "--debug" ]; then wslu_debug=1 echo -e '\e[38;5;202m\033[1m[debug] Showing debug output. \033(B\033[m' shift fi # checking interoperability grep enabled /proc/sys/fs/binfmt_misc/WSLInterop >/dev/null || (echo -e "\e[31m\033[1m[error] WSL Interoperability is disabled. Please enable it before using WSL.\033(B\033[m"; exit 1) # variables ## color black=$(echo -e '\e[30m') red=$(echo -e '\e[31m') green=$(echo -e '\e[32m') brown=$(echo -e '\e[33m') blue=$(echo -e '\e[34m') purple=$(echo -e '\e[35m') cyan=$(echo -e '\e[36m') yellow=$(echo -e '\e[33m') white=$(echo -e '\e[37m') dark_gray=$(echo -e '\e[1;30m') light_red=$(echo -e '\e[1;31m') light_green=$(echo -e '\e[1;32m') light_blue=$(echo -e '\e[1;34m') light_purple=$(echo -e '\e[1;35m') light_cyan=$(echo -e '\e[1;36m') light_gray=$(echo -e '\e[37m') orange=$(echo -e '\e[38;5;202m') light_orange=$(echo -e '\e[38;5;214m') deep_purple=$(echo -e '\e[38;5;140m') bold=$(echo -e '\033[1m') reset=$(echo -e '\033(B\033[m') ## indicator info="${green}[info]${reset}" input_info="${cyan}[input]${reset}" error="${red}[error]${reset}" warn="${orange}[warn]${reset}" ## Windows build number constant readonly BN_SPR_CREATORS=15063 #1703, Redstone 2, Creators Update readonly BN_FAL_CREATORS=16299 #1709, Redstone 3, Fall Creators Update readonly BN_APR_EIGHTEEN=17134 #1803, Redstone 4, April 2018 Update readonly BN_OCT_EIGHTEEN=17763 #1809, Redstone 5, October 2018 Update readonly BN_MAY_NINETEEN=18362 #1903, 19H1, May 2019 Update readonly BN_NOV_NINETEEN=18363 #1909, 19H2, November 2019 Update # functions function debug_echo { [ $wslu_debug -eq 1 ] && echo "${orange}${bold}[debug]${reset} $@" } function error_echo { echo "${error} $1" exit $2 } function help { app_name=$(basename "$1") echo -e "$app_name - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux Usage: $2 For more help for $app_name, please use the command \`man $app_name\` or visit the following site: https://wslutiliti.es/wslu/man/$app_name.html. For overall help, you can use the command \`man wslu\` or visite the following site: https://wslutiliti.es/wslu." } function double_dash_p { echo "${@//\\/\\\\}" } function interop_prefix { win_location="/mnt/" if [ -f /etc/wsl.conf ]; then tmp="$(awk -F '=' '/root/ {print $2}' /etc/wsl.conf | awk '{$1=$1;print}')" [ "$tmp" == "" ] || win_location="$tmp" [[ "$win_location" =~ ^.*/$ ]] || win_location="$win_location/" # make sure it always end with slash unset tmp fi echo "$win_location" unset win_location } function sysdrive_prefix { win_location="$(interop_prefix)" hard_reset=0 for pt in $(ls "$win_location"); do if [ $(echo "$pt" | wc -l) -eq 1 ]; then if [ -d "$win_location$pt/Windows/System32" ]; then hard_reset=1 win_location="$pt" break fi fi done if [ $hard_reset -eq 0 ]; then win_location="c" fi echo "$win_location" unset win_location unset hard_reset } function chcp_com { "$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/chcp.com "$@" >/dev/null } function winps_exec { cp="$(cat ~/.config/wslu/oemcp)" chcp_com "$cp" cp=$(($cp+0)) "$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -NoProfile -NonInteractive –ExecutionPolicy Bypass -Command "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding($cp); $@" EXIT_STATUS=$? chcp_com 65001 return $EXIT_STATUS } function baseexec_gen { wslutmpbuild=$("$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion" /v CurrentBuild | tail -n 2 | head -n 1 | sed -e 's|\r||g') wslutmpbuild=${wslutmpbuild##* } wslutmpbuild="$(( $wslutmpbuild + 0 ))" if [ $wslutmpbuild -ge $BN_MAY_NINETEEN ]; then # The environment variable only available in 19H1 or later. wslu_distro_regpath=$("$(interop_prefix)"c/Windows/System32/reg.exe query "HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss" /s /f DistributionName 2>&1 | sed -e 's|\r||g' | grep -B1 -e "$WSL_DISTRO_NAME$" | head -n1 ) if "$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "$wslu_distro_regpath" /v PackageFamilyName &>/dev/null; then wslu_distro_packagename=$("$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "$wslu_distro_regpath" /v PackageFamilyName | tail -n 2 | head -n 1 | sed -e 's|\r||g') # if it is a store distro wslu_distro_packagename=${wslu_distro_packagename##* } wslu_base_exec_folder_path="$(wslpath "$(winps_exec "[Environment]::GetFolderPath('LocalApplicationData')" | tr -d "\r")\\Microsoft\\WindowsApps\\$wslu_distro_packagename")" wslpath -w "$(find "$wslu_base_exec_folder_path" -name "*.exe")" > ~/.config/wslu/baseexec else # if it is imported distro echo "$(wslpath -w "$(interop_prefix)$(sysdrive_prefix)")Windows\\System32\\wsl.exe" > ~/.config/wslu/baseexec fi else # older version fallback. echo "$(wslpath -w "$(interop_prefix)$(sysdrive_prefix)")\\Windows\\System32\\wsl.exe" > ~/.config/wslu/baseexec fi } function var_gen { date +"%s" > ~/.config/wslu/triggered_time rm -f ~/.config/wslu/baseexec rm -f ~/.config/wslu/oemcp # generate oem codepage "$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage" /v OEMCP 2>&1 | sed -n 3p | sed -e 's|\r||g' | grep -o '[[:digit:]]*' > ~/.config/wslu/oemcp # generate base exe location baseexec_gen } function wslu_file_check { should_i_show="" [[ "$3" == "?!S" ]] && should_i_show="n" if [[ ! -f "$1/$2" ]]; then [[ -z "$should_i_show" ]] && echo "${warn} $2 not found in Windows directory. Copying right now..." [[ -d "$1" ]] || mkdir "$1" if [[ -f "/usr/share/wslu/$2" ]]; then cp "/usr/share/wslu/$2" "$1" [[ -z "$should_i_show" ]] && echo "${info} $2 copied. Located at \"$1\"." else [[ -z "$should_i_show" ]] && echo "${error} $2 not found. Failed to copy." exit 30 fi fi } function wslu_get_build { build=$("$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion" /v CurrentBuild | tail -n 2 | head -n 1 | sed -e 's|\r||g') echo "${build##* }" } # first run, saving some information if [ ! -d ~/.config/wslu ]; then mkdir -p ~/.config/wslu fi # This gets tirggered then: # 1. if it's the first time the script is triggered, i.e., # ~/.config/wslu/triggered time # 2. if update_time is also not present, i.e., # badly installed packages or installed via install script if [ ! -f ~/.config/wslu/triggered_time ] || [ ! -f /usr/share/wslu/updated_time ]; then var_gen # This gets triggered when: # installed time is larger than the last triggered time elif [ $(cat ~/.config/wslu/triggered_time) -lt $(cat /usr/share/wslu/updated_time) ]; then var_gen fi # basic distro detection distro="$(cat /etc/os-release | sed -n -e '/^NAME=.*/p'| sed -e 's/^NAME=\"//g')" case $distro in *Pengwin*) distro="pengwin";; *WLinux*) distro="wlinux";; Ubuntu*) distro="ubuntu";; *Debian*) distro="debian";; *Kali*) distro="kali";; openSUSE*) distro="opensuse";; SLES*) distro="sles";; Alpine*) distro="alpine";; Arch*) distro="archlinux";; *Oracle*) distro="oracle";; Scientific*) distro="scilinux";; *Fedora\ Remix\ for\ WSL*) distro="fedoraremix";; *Fedora*) distro="fedora";; *Generic*) [ "fedora" == "$(grep -e "LIKE=" /etc/os-release | sed -e 's/ID_LIKE=//g')" ] && distro="oldfedora" || distro="unknown";; *) distro="unknown";; esac wslu-3.2.3/src/wslupath.sh000066400000000000000000000043331404616463300155150ustar00rootroot00000000000000# shellcheck shell=bash version="09" ########## CAUTION ########### ## wslupath is a legacy cli for backward compatbility. ## Use it unless it is necessary. style=1 reg_path=0 set_path="" help_short="wslupath [-dOr] [-D|-A|-T|-S|-W|-s|-su|-H|-P|...NAME...]\nwslupath [-h|-v|-R]" function path_double_dash { new_path="${*//\\/\\\\}" echo "$new_path" } function general_converter { target="$*" if [[ $target =~ ^[A-Z]:(\\[^:\\]+)*(\\)?$ ]]; then p=$(wslpath -u "${target}") elif [[ $target =~ ^$(interop_prefix)[A-Za-z](/[^/]+)*(/)?$ ]]; then p=$(wslpath -w "${target}") else echo "${error} No proper path form detected: ""$*""." exit 20 fi echo "$p" } function style_path { case $style in 1) p="$(general_converter "$@")";; 2) p="$*";; 3) p="$(path_double_dash "$@")";; esac echo "$p" } if [[ $# -eq 0 ]]; then echo -e "$help_short" exit 20 else for args; do case $args in #styles -r|--reg-data) reg_path=1;; -O|--original) style=2;; -d|--doubledash-dir) style=3;; ## system location -D|--desktop) set_path="$(style_path "$(wslvar -l 'Desktop')")" break;; -A|--appdata) set_path="$(style_path "$(wslvar -s APPDATA)")" break;; -T|--temp) set_path="$(style_path "$(wslvar -s TMP)")" break;; -S|--sysdir) set_path="$(style_path "$(wslvar -s windir)"\\System32)" break;; -W|--windir) set_path="$(style_path "$(wslvar -s windir)")" break;; -s|--start-menu) set_path="$(style_path "$(wslvar -l 'Start Menu')")" break;; -su|--startup) set_path="$(style_path "$(wslvar -l 'Startup')")" break;; -H|--home) set_path="$(style_path "$(wslvar HOMEDRIVE)""$(wslvar HOMEPATH)")" break;; -P|--program-files) set_path="$(style_path "$(wslvar -s ProgramFiles)")" break;; -h|--help) help "$0" "$help_short"; exit;; -v|--version) echo "wslu v$wslu_version; wslupath v$version"; exit;; -R|--avail-reg) echo "Available registery input:" wslvar -L exit;; *) if [[ "$reg_path" == "1" ]]; then set_path="$(style_path "$(wslvar -l "$args")")" else set_path="$(style_path "$args")" fi break;; esac done fi if [[ "$set_path" == "" ]]; then echo "${error}No path input. Aborted." exit 21 else echo "$set_path" fi wslu-3.2.3/src/wslusc.sh000066400000000000000000000142051404616463300151650ustar00rootroot00000000000000# shellcheck shell=bash version="40" cname="" iconpath="" is_gui=0 is_interactive=0 customname="" customenv="" help_short="wslusc [-gi] [-e PATH] [-n NAME] [-i FILE] COMMAND\nwslusc [-hv]" while [ "$1" != "" ]; do case "$1" in -I|--interactive)is_interactive=1;shift;; -i|--icon)shift;iconpath=$1;shift;; -n|--name)shift;customname=$1;shift;; -e|--env)shift;customenv=$1;shift;; -g|--gui)is_gui=1;shift;; -h|--help) help "$0" "$help_short"; exit;; -v|--version) echo "wslu v$wslu_version; wslusc v$version"; exit;; *) cname_header="$1"; shift; cname="$*"; break;; esac done # interactive mode if [[ $is_interactive -eq 1 ]]; then echo "${info} Welcome to wslu shortcut creator interactive mode." read -r -e -i "$cname_header" -p "${input_info} Command (Without Parameter): " input cname_header="${input:-$cname_header}" read -r -e -i "$cname" -p "${input_info} Command param: " input cname="${input:-$cname}" read -r -e -i "$customname" -p "${input_info} Shortcut name [optional, ENTER for default]: " input customname="${input:-$customname}" read -r -e -i "$is_gui" -p "${input_info} Is it a GUI application? [if yes, input 1; if no, input 0]: " input is_gui=$(( ${input:-$is_gui} + 0 )) read -r -e -i "$customenv" -p "${input_info} Pre-executed command [optional, ENTER for default]: " input customenv="${input:-$customenv}" read -r -e -i "$iconpath" -p "${input_info} Custom icon Linux path (support ico/png/xpm/svg) [optional, ENTER for default]: " input iconpath="${input:-$iconpath}" fi if [[ "$cname_header" != "" ]]; then up_path="$(wslvar -s USERPROFILE)" tpath=$(double_dash_p "$(wslvar -s TMP)") # Windows Temp, Win Double Sty. tpath="${tpath:-$(double_dash_p "$(wslvar -s TEMP)")}" # sometimes TMP is not set for some reason dpath=$(wslpath "$(wslvar -l Desktop)") # Windows Desktop, WSL Sty. script_location="$(wslpath "$up_path")/wslu" # Windows wslu, Linux WSL Sty. script_location_win="$(double_dash_p "$up_path")\\wslu" # Windows wslu, Win Double Sty. distro_location_win="$(double_dash_p "$(cat ~/.config/wslu/baseexec)")" # Distro Location, Win Double Sty. # change param according to the exec. distro_param="run" if [[ "$distro_location_win" == *wsl\.exe* ]]; then if [ $(wslu_get_build) -ge $BN_MAY_NINETEEN ]; then distro_param="-d $WSL_DISTRO_NAME -e" else distro_param="-e" fi fi # handling the execuable part, a.k.a., cname_header # always absolute path tmp_cname_header="$(readlink -f "$cname_header")" if [ ! -f "$tmp_cname_header" ]; then cname_header="$(which "$cname_header")" else cname_header="$tmp_cname_header" fi unset tmp_cname_header [ -z "$cname_header" ] && error_echo "Bad or invalid input; Aborting" 30 # handling no name given case new_cname=$(basename "$cname_header") # handling name given case if [[ "$customname" != "" ]]; then new_cname=$customname fi # construct full command cname="\"$(echo "$cname_header" | sed "s| |\\\\ |g") $cname\"" # Check default icon and runHidden.vbs wslu_file_check "$script_location" "wsl.ico" wslu_file_check "$script_location" "wsl-term.ico" wslu_file_check "$script_location" "wsl-gui.ico" wslu_file_check "$script_location" "runHidden.vbs" # handling icon if [[ "$iconpath" != "" ]]; then icon_filename="$(basename "$iconpath")" ext="${iconpath##*.}" if [[ ! -f $iconpath ]]; then iconpath="$(double_dash_p "$up_path")\\wslu\\wsl.ico" echo "${warn} Icon not found. Reset to default icon..." else echo "${info} You choose to use custom icon: $iconpath. Processing..." cp "$iconpath" "$script_location" if [[ "$ext" != "ico" ]]; then if ! type convert > /dev/null; then echo "The 'convert' command is needed for converting the icon." if [ -x /usr/lib/command-not-found ]; then echo " It can be installed with:" >&2 echo "" >&2 /usr/lib/command-not-found convert 2>&1 | egrep -v '(not found|^$)' >&2 else echo "It can usally be found in the imagemagick package, please install it." fi exit 22 fi if [[ "$ext" == "svg" ]]; then echo "${info} Converting $ext icon to ico..." convert "$script_location/$icon_filename" -trim -background none -resize 256X256 -define 'icon:auto-resize=16,24,32,64,128,256' "$script_location/${icon_filename%.$ext}.ico" rm "$script_location/$icon_filename" icon_filename="${icon_filename%.$ext}.ico" elif [[ "$ext" == "png" ]] || [[ "$ext" == "xpm" ]]; then echo "${info} Converting $ext icon to ico..." convert "$script_location/$icon_filename" -resize 256X256 "$script_location/${icon_filename%.$ext}.ico" rm "$script_location/$icon_filename" icon_filename="${icon_filename%.$ext}.ico" else error_echo "wslusc only support creating shortcut using .png/.svg/.ico icon. Aborted." 22 fi fi iconpath="$script_location_win\\$icon_filename" fi else if [[ "$is_gui" == "1" ]]; then iconpath="$(double_dash_p "$up_path")\\wslu\\wsl-gui.ico" else iconpath="$(double_dash_p "$up_path")\\wslu\\wsl-term.ico" fi fi # handling custom vairable command if [[ "$customenv" != "" ]]; then echo "${info} the following custom variable/command will be applied: $customenv" fi if [[ "$is_gui" == "1" ]]; then winps_exec "Import-Module 'C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\Microsoft.PowerShell.Utility\\Microsoft.PowerShell.Utility.psd1';\$s=(New-Object -COM WScript.Shell).CreateShortcut('$tpath\\$new_cname.lnk');\$s.TargetPath='C:\\Windows\\System32\\wscript.exe';\$s.Arguments='$script_location_win\\runHidden.vbs $distro_location_win $distro_param $customenv /usr/share/wslu/wslusc-helper.sh $cname';\$s.IconLocation='$iconpath';\$s.Save();" else winps_exec "Import-Module 'C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\Microsoft.PowerShell.Utility\\Microsoft.PowerShell.Utility.psd1';\$s=(New-Object -COM WScript.Shell).CreateShortcut('$tpath\\$new_cname.lnk');\$s.TargetPath='$distro_location_win';\$s.Arguments='$distro_param $customenv bash -l -c $cname';\$s.IconLocation='$iconpath';\$s.Save();" fi tpath="$(wslpath "$tpath")/$new_cname.lnk" mv "$tpath" "$dpath" echo "${info} Create shortcut ${new_cname}.lnk successful" else error_echo "No input, aborting" 21 fi wslu-3.2.3/src/wslvar.sh000066400000000000000000000023371404616463300151660ustar00rootroot00000000000000# shellcheck shell=bash version="03" var_type=1 help_short="wslvar [-sl] NAME\nwslvar [-hvSL]" function call_shell { winps_exec "(Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders').'$*'" | cat } function view_shell { winps_exec "Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders'"| tail -n +3 | head -n -10 } function call_sys { winps_exec "Write-Output \$Env:$*" | cat } function view_sys { winps_exec "Get-ChildItem env:" | tail -n +2 | head -n -2 } function cl_destoryer { echo "$@" | tr -d "\r" } function caller { if [ "$*" != "" ]; then case $var_type in 1) p="$(cl_destoryer "$(call_sys "$@")")";; 2) p="$(cl_destoryer "$(call_shell "$@")")";; *) error_echo "Invalid variable type. Aborted." 22;; esac echo "$p" else error_echo "No Input. Aborted." 21 fi } while [ "$1" != "" ]; do case "$1" in -s|--sys) var_type=1; shift;; -l|--shell) var_type=2; shift;; -S|--getsys) view_sys; exit;; -L|--getshell) view_shell; exit;; -h|--help) help "$0" "$help_short"; exit;; -v|--version) echo "wslu v$wslu_version; wslvar v$version"; exit;; *) caller "$@"; exit;; esac done error_echo "No Input. Aborted." 21 wslu-3.2.3/src/wslview.sh000066400000000000000000000055101404616463300153440ustar00rootroot00000000000000# shellcheck shell=bash version="10" lname="" help_short="$0 [-hvur]\n$0 LINK/FILE" function del_reg_alt { if [ "$distro" == "archlinux" ] || [ "$distro" == "alpine" ]; then echo "${error} Unsupported action for this distro. Aborted. " exit 34 else sudo update-alternatives --remove x-www-browser "$(readlink -f "$0")" sudo update-alternatives --remove www-browser "$(readlink -f "$0")" exit fi } function add_reg_alt { if [ "$distro" == "archlinux" ] || [ "$distro" == "alpine" ]; then error_echo "Unsupported action for this distro. Aborted." 34 else sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser "$(readlink -f "$0")" 30 sudo update-alternatives --install /usr/bin/www-browser www-browser "$(readlink -f "$0")" 30 exit fi } for args; do case $args in -r|--reg-as-browser) add_reg_alt;; -u|--unreg-as-browser) del_reg_alt;; -h|--help) help "$0" "$help_short"; exit;; -v|--version) echo "wslu v$wslu_version; wslview v$version"; exit;; *) lname="$lname$args";; esac done if [[ "$lname" != "" ]]; then wslutmpbuild=$(wslu_get_build) # file:/// protocol used in linux if [[ "$lname" =~ ^file:\/\/.*$ ]] && [[ ! "$lname" =~ ^file:\/\/(\/)+[A-Za-z]\:.*$ ]]; then [ $wslutmpbuild -ge "$BN_MAY_NINETEEN" ] || error_echo "This protocol is not supported before version 1903." 34 properfile_full_path="$(readlink -f "${lname//file:\/\//}")" interop_win_type="$(interop_prefix)$(sysdrive_prefix)" converted_file_path="\\\\wsl\$\\$WSL_DISTRO_NAME${properfile_full_path//\//\\}" [[ "$properfile_full_path" =~ ^${interop_win_type//\/$/}.*$ ]] && converted_file_path="$(wslpath -w "$properfile_full_path")" lname="$converted_file_path" # Linux absolute path elif [[ "$lname" =~ ^(/[^/]+)*(/)?$ ]]; then [ $wslutmpbuild -ge "$BN_MAY_NINETEEN" ] || error_echo "This protocol is not supported before version 1903." 34 properfile_full_path="$(readlink -f "${lname}")" interop_win_type="$(interop_prefix)$(sysdrive_prefix)" converted_file_path="\\\\wsl\$\\$WSL_DISTRO_NAME${properfile_full_path//\//\\}" [[ "$properfile_full_path" =~ ^${interop_win_type//\/$/}.*$ ]] && converted_file_path="$(wslpath -w "$properfile_full_path")" lname="$converted_file_path" # Linux relative path elif [[ -d "$(readlink -f "$lname")" ]] || [[ -f "$(readlink -f "$lname")" ]]; then [ $wslutmpbuild -ge "$BN_MAY_NINETEEN" ] || error_echo "This protocol is not supported before version 1903." 34 properfile_full_path="$(readlink -f "${lname}")" interop_win_type="$(interop_prefix)$(sysdrive_prefix)" converted_file_path="\\\\wsl\$\\$WSL_DISTRO_NAME${properfile_full_path//\//\\}" [[ "$properfile_full_path" =~ ^${interop_win_type//\/$/}.*$ ]] && converted_file_path="$(wslpath -w "$properfile_full_path")" lname="$converted_file_path" fi winps_exec Start "\"$lname\"" else error_echo "No input, aborting" 21 fi wslu-3.2.3/tests/000077500000000000000000000000001404616463300136625ustar00rootroot00000000000000wslu-3.2.3/tests/header.bats000066400000000000000000000021611404616463300157650ustar00rootroot00000000000000#!/usr/bin/env bats #header testing @test "Header - Colortesting 1" { color="$(. src/wslu-header;echo -e $black | cat -A)" [ "$color" = "^[[30m$" ] } @test "Header - Colortesting 2" { color="$(. src/wslu-header;echo -e $light_red | cat -A)" [ "$color" = "^[[1;31m$" ] } @test "Header - colortesting 3" { color="$(. src/wslu-header;echo -e $orange | cat -A)" [ "$color" = "^[[38;5;202m$" ] } @test "Header - Format 1" { format="$(. src/wslu-header;echo -e $bold | cat -A)" [ "$format" = "^[[1m$" ] } @test "Header - Format 2" { format="$(. src/wslu-header;echo -e $reset | cat -A)" [ "$format" = "^[(B^[[m$" ] } @test "Header - Indicator" { format="$(. src/wslu-header;echo -e $info | cat -A)" [ "$format" = "^[[32m[info]^[(B^[[m$" ] } @test "Header - Double Dash Parsing" { format="$(. src/wslu-header; echo "$(double_dash_p "\\")")" [ "$format" = "\\\\" ] } @test "Header - Interop Prefix" { format="$(. src/wslu-header; echo "$(interop_prefix)")" [ "$format" = "/mnt/" ] } @test "Header - System Drive Prefix" { format="$(. src/wslu-header; echo "$(sysdrive_prefix)")" [ "$format" = "c" ] }wslu-3.2.3/tests/wslact.bats000066400000000000000000000046521404616463300160410ustar00rootroot00000000000000#!/usr/bin/env bats #wslact testing @test "wslact - Help" { run out/wslact --help [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact COMMAND ..." ] } @test "wslact - Help - Alt." { run out/wslact -h [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact COMMAND ..." ] } @test "wslact - Time Sync - Help" { run out/wslact time-sync --help [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact time-sync [-h]" ] } @test "wslact - Time Sync - Help - Alt." { run out/wslact time-sync -h [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact time-sync [-h]" ] } @test "wslact - Time Sync - short form - Help" { run out/wslact ts --help [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact time-sync [-h]" ] } @test "wslact - Time Sync - short form - Help - Alt." { run out/wslact ts -h [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact time-sync [-h]" ] } @test "wslact - Smart Mounting - Help" { run out/wslact auto-mount --help [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact auto-mount [-mh]" ] } @test "wslact - Smart Mounting - Help - Alt." { run out/wslact auto-mount -h [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact auto-mount [-mh]" ] } @test "wslact - Smart Mounting - short form - Help" { run out/wslact am --help [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact auto-mount [-mh]" ] } @test "wslact - Smart Mounting - short form - Help - Alt." { run out/wslact am -h [ "${lines[0]}" = "wslact - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslact auto-mount [-mh]" ] }wslu-3.2.3/tests/wslfetch.bats000066400000000000000000000010611404616463300163520ustar00rootroot00000000000000#!/usr/bin/env bats #wslsys testing @test "wslfetch - No parameter" { run out/wslfetch [ "$status" -eq 0 ] } @test "wslfetch - Help" { run out/wslfetch --help [ "${lines[0]}" = "wslfetch - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslfetch [-hvlsc]" ] } @test "wslfetch - Help - Alt." { run out/wslfetch -h [ "${lines[0]}" = "wslfetch - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslfetch [-hvlsc]" ] } wslu-3.2.3/tests/wslsys.bats000066400000000000000000000017421404616463300161050ustar00rootroot00000000000000#!/usr/bin/env bats #wslsys testing @test "wslsys - No parameter" { run out/wslsys [[ "${lines[0]}" =~ ^WSL\ Version\:\ [1-2]$ ]] [ "$status" -eq 0 ] } @test "wslsys - Help" { run out/wslsys --help [ "${lines[0]}" = "wslsys - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [[ "${lines[1]}" =~ ^Usage\:\ .*wslsys\ \[\-VIbBFUWRKPSlt\]\ \[\-s\]$ ]] [[ "${lines[2]}" =~ ^.*wslsys\ \[\-hv\]$ ]] } @test "wslsys - Help - Alt." { run out/wslsys -h [ "${lines[0]}" = "wslsys - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [[ "${lines[1]}" =~ ^Usage\:\ .*wslsys\ \[\-VIbBFUWRKPSlt\]\ \[\-s\]$ ]] [[ "${lines[2]}" =~ ^.*wslsys\ \[\-hv\]$ ]] } @test "wslsys - /w parameter" { run out/wslsys -B [[ "${lines[0]}" =~ ^Build\:\ [0-9]{5}$ ]] [ "$status" -eq 0 ] } @test "wslsys - /w parameter - shortform" { run out/wslsys -B -s [[ "${lines[0]}" =~ ^[0-9]{5}$ ]] [ "$status" -eq 0 ] } wslu-3.2.3/tests/wslupath.bats000066400000000000000000000036751404616463300164170ustar00rootroot00000000000000#!/usr/bin/env bats #wslupath testing @test "wslupath - No parameter" { run out/wslupath [ "${lines[0]}" = "wslupath [-dOr] [-D|-A|-T|-S|-W|-s|-su|-H|-P|...NAME...]" ] [ "${lines[1]}" = "wslupath [-h|-v|-R]" ] [ "$status" -eq 20 ] } @test "wslupath - Help" { run out/wslupath --help [ "${lines[0]}" = "wslupath - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslupath [-dOr] [-D|-A|-T|-S|-W|-s|-su|-H|-P|...NAME...]" ] [ "${lines[2]}" = "wslupath [-h|-v|-R]" ] } @test "wslupath - Help - Alt." { run out/wslupath -h [ "${lines[0]}" = "wslupath - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslupath [-dOr] [-D|-A|-T|-S|-W|-s|-su|-H|-P|...NAME...]" ] [ "${lines[2]}" = "wslupath [-h|-v|-R]" ] } @test "wslupath - Available Registery" { run out/wslupath --avail-reg [ "${lines[0]}" = "Available registery input:" ] } @test "wslupath - Available Registery - Alt." { run out/wslupath -R [ "${lines[0]}" = "Available registery input:" ] } @test "wslupath - No parameter - Windows Double DirPath" { run out/wslupath "C:\\Windows" [ "${lines[0]}" = "/mnt/c/Windows" ] } @test "wslupath - No parameter - Windows DirPath" { run out/wslupath "C:\Windows" [ "${lines[0]}" = "/mnt/c/Windows" ] } @test "wslupath - No parameter - Linux DirPath" { run out/wslupath "/mnt/c/Windows" [ "${lines[0]}" = "C:\\Windows" ] } @test "wslupath - /w DoubleDash - Windows Double DirPath" { run out/wslupath -d "C:\\Windows" [ "${lines[0]}" = "C:\\\\Windows" ] } @test "wslupath - /w DoubleDash - Windows DirPath" { run out/wslupath -d "C:\Windows" [ "${lines[0]}" = "C:\\\\Windows" ] } @test "wslupath - /w DoubleDash - Linux DirPath" { run out/wslupath -d "/mnt/c/Windows" [ "${lines[0]}" = "/mnt/c/Windows" ] } @test "wslupath - /w parameter - No Input" { run out/wslupath -d [ "${status}" -eq 21 ] } wslu-3.2.3/tests/wslusc.bats000066400000000000000000000021571404616463300160620ustar00rootroot00000000000000#!/usr/bin/env bats #wslusc testing teardown() { echo "removal for temporary shortcuts" rm -rf "$(wslupath -D)/htop.lnk" rm -rf "$(wslupath -D)/gedit.lnk" } @test "wslusc - No parameter" { run out/wslusc [ "$status" -eq 21 ] } @test "wslusc - Help" { run out/wslusc --help [ "${lines[0]}" = "wslusc - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslusc [-gi] [-e PATH] [-n NAME] [-i FILE] COMMAND" ] [ "${lines[2]}" = "wslusc [-hv]" ] } @test "wslusc - Help - Alt." { run out/wslusc -h [ "${lines[0]}" = "wslusc - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslusc [-gi] [-e PATH] [-n NAME] [-i FILE] COMMAND" ] [ "${lines[2]}" = "wslusc [-hv]" ] } @test "wslusc - non-exist file" { run out/wslusc wryyyyy [ "$status" -eq 30 ] } @test "wslusc - without GUI" { run out/wslusc htop [ -f "$(wslupath -D)/htop.lnk" ] } @test "wslusc - with GUI" { run out/wslusc -g gedit [ -f "$(wslupath -D)/gedit.lnk" ] } # TODO: Add more tests to cover all possible caseswslu-3.2.3/tests/wslvar.bats000066400000000000000000000020751404616463300160570ustar00rootroot00000000000000#!/usr/bin/env bats #wslvar testing @test "wslvar - No parameter" { run out/wslvar [ "$status" -eq 21 ] } @test "wslvar - Help" { run out/wslvar --help [ "${lines[0]}" = "wslvar - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslvar [-sl] NAME" ] [ "${lines[2]}" = "wslvar [-hvSL]" ] } @test "wslvar - Help - Alt." { run out/wslvar -h [ "${lines[0]}" = "wslvar - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [ "${lines[1]}" = "Usage: wslvar [-sl] NAME" ] [ "${lines[2]}" = "wslvar [-hvSL]" ] } @test "wslvar - System Variables" { run out/wslvar -s SYSTEMROOT [ "${lines[0]}" = "C:\WINDOWS" ] } @test "wslvar - /w -s parameter - No Input" { run out/wslvar -s [ "${status}" -eq 21 ] } @test "wslvar - Register Variables" { run out/wslvar -l AppData [[ "${lines[0]}" =~ ^C\:\\Users\\.*\\AppData\\Roaming$ ]] } @test "wslvar - /w -l parameter - No Input" { run out/wslvar -l [ "${status}" -eq 21 ] } wslu-3.2.3/tests/wslview.bats000066400000000000000000000032441404616463300162400ustar00rootroot00000000000000#!/usr/bin/env bats #wslview testing @test "wslview - No parameter" { run out/wslview [ "$status" -eq 21 ] } @test "wslview - Help" { run out/wslview --help [ "${lines[0]}" = "wslview - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [[ "${lines[1]}" =~ ^Usage\:\ .*wslview\ \[\-hvur\]$ ]] [[ "${lines[2]}" =~ ^.*wslview\ LINK/FILE$ ]] } @test "wslview - Help - Alt." { run out/wslview -h [ "${lines[0]}" = "wslview - Part of wslu, a collection of utilities for Windows 10 Windows Subsystem for Linux" ] [[ "${lines[1]}" =~ ^Usage\:\ .*wslview\ \[\-hvur\]$ ]] [[ "${lines[2]}" =~ ^.*wslview\ LINK/FILE$ ]] } @test "wslview - Linux - relative" { run out/wslview . [ "$status" -eq 0 ] } @test "wslview - Linux - absolute" { run out/wslview /home [ "$status" -eq 0 ] } @test "wslview - Linux - file protocol" { run out/wslview file:///etc [ "$status" -eq 0 ] } @test "wslview - Windows folder in Linux - absolute" { run out/wslview /mnt/c/Windows [ "$status" -eq 0 ] } @test "wslview - Windows folder in Linux - file protocol" { run out/wslview file:///mnt/c/Users [ "$status" -eq 0 ] } @test "wslview - Windows - absolute" { run out/wslview "C:/Users/Public" [ "$status" -eq 0 ] } @test "wslview - Windows - file protocol" { run out/wslview "file:///C:/Windows/System32" [ "$status" -eq 0 ] } @test "wslview - Internet - no protocol" { run out/wslview "www.duckduckgo.com" [ "$status" -eq 0 ] } @test "wslview - Internet - http" { run out/wslview "http://info.cern.ch" [ "$status" -eq 0 ] } @test "wslview - Internet - https" { run out/wslview "https://wslutiliti.es/" [ "$status" -eq 0 ] }