GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sop/wslscript: Associate .sh script files with WSL.

BranchesTags
Open more actions menu

Latest commit

 

History

87 Commits
87 Commits

Folders and files

NameName
Last commit message
Last commit date
.cargo
.cargo
 
 
_layouts
_layouts
 
 
assets
assets
 
 
examples
examples
 
 
wslscript
wslscript
 
 
wslscript_common
wslscript_common
 
 
wslscript_handler
wslscript_handler
 
 
.gitignore
.gitignore
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
_config.yml
_config.yml
 
 
package-release.ps1
package-release.ps1
 
 

Repository files navigation

WSL Script

Shell script (.sh) handler for Windows Subsystem for Linux (WSL).

Associates .sh (or any other) extension to be executed in WSL. Automatically handles Windows → Unix path conversions. Files can be dragged and dropped to registered file icon in explorer to pass paths as arguments.

Usage

Copy wslscript.exe and wslscript_handler.dll to a location of your choice. These files are used to invoke WSL, so don't move them afterwards.

Run wslscript.exe to open a setup GUI. Enter the extension and click Register button to add filetype association into Windows registry.

After registration, .sh files can be executed from explorer by double clicking. Other files can be passed as path arguments by dragging and dropping them into .sh file icon.

Scripts are executed in the same folder where the script file is located, ie. $PWD is set to script's directory.

Tips

Change the Default User

If scripts run as root, you may wish to change the default WSL user.

Add the following to /etc/wsl.conf file:

[user]
default = username

TODO

  • Optionally register for all users

License

This project is licensed under the MIT License.

Icon by Tango Desktop Project.

About

Associate .sh script files with WSL.

sop.github.io/wslscript/

Topics

bashdrag-and-dropscriptingshell-scriptwsl

Resources

Readme
MIT license
Activity

Stars

25 stars

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.