Skip to content
Eric Trenkel edited this page Apr 24, 2023 · 8 revisions

Quick Actions

Since v1.4.0

In the "Quick Actions" tab on the side you can create new command scripts for your distros. Those can be used to quickly set up predefined environments or to do tedious management/updating work faster. As each line is interpreted as a single command you can quickly define routines that work across all your instances.

Note: If you want a deeper understanding on how they are executed in your WSL instances you can check this method: lib/components/api.dart#L347

Currently, each command has a 15-second timeout. Anything that will take longer without producing any output at all might not show up in the console but might still be executed by the instance.

Here is a little example of a Quick Setting named "Test". (Go to "Quick Actions" -> "New Quick Action"):

apt-get update
apt-get install python

echo "test" > /tmp/testfile

You can execute this now by clicking on any of your distros settings, then on "Execute Quick Action" -> "Test".

All in all here is a sample video on how the quick actions work:

quick_actions_demo.mp4

If you have your own Quick Action that you want to share you can create a PR in this repository: https://github.com/bostrot/wsl-scripts

Turnkey images

Turnkey images can be used to create instances quickly.

turnkey_init

Turnkey instances can be inited with turnkey-init in console. This will let you choose new passwords for your services.

fake_systemd

As systemd is not officially supported in WSL (yet) fake_systemd is a custom fork from @kvaps specifically for WSL so that Turnkey services will actually startup when opening the instance.

Docker Images

Since v1.7.0

You can use a rootfs from docker hub as your distro. Simply use the following syntax to specify an image to use:

dockerhub:image_to_use:tag_to_use

e.g.

dockerhub:ubuntu:latest

You can find a list of images directly on Docker Hub

Clone this wiki locally