-2

I would like to add a shortcut in Windows10 using DisplayFusion to
launch WSL Kali Linux and directly open the file manager ranger.

DisplayFusionSettings

Example: This works quite well for launching a new firefox tab:

  • Function Name: Launch_Firefox
  • Key Combination: Ctrl+Alt+F
  • Application: C:\Program Files\Mozilla Firefox\firefox.exe
  • Application Parameters: -new-tab "https://www.google.com"

KaliLinux launcher:
DisplayFusionAddFunction

Unfortunately I cant figure out where the executable for Kali Linux is stored.
I know that the Windows-App-Store storage-location of the WSL is
C:\Users\[USER]\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\
Neither in this path nor in any subdirectory is an executable to find.
Google only shows me results for where the Linux root directory of the WSL is located:
C:\Users\[USER]\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState\rootfs

Q: Where ist the executable of the WSL (Windows Subsystem for Linux) of Kali located?

PatrickSteiner
  • 495
  • 4
  • 26

2 Answers2

1

According to the documentation, something like wsl kali (or the full path wsl \usr\local/bin/_wherever_/kali) might be sufficient. From PowerShell, I have just tried:

wsl df -h

And it outputs what I expected it would:

Filesystem      Size  Used Avail Use% Mounted on
rootfs          238G  129G  109G  55% /
none            238G  129G  109G  55% /dev
none            238G  129G  109G  55% /run
none            238G  129G  109G  55% /run/lock
none            238G  129G  109G  55% /run/shm
none            238G  129G  109G  55% /run/user
cgroup          238G  129G  109G  55% /sys/fs/cgroup
C:\             238G  129G  109G  55% /mnt/c
Ken Y-N
  • 14,644
  • 21
  • 71
  • 114
  • Hi, at first thanks for the tip! Inside an open cmd `C:\Users\[USER]>start wsl ranger` does exactly what it should, however when setting Application=`C:\Windows\System32\cmd.exe` and Parameters=`start wsl ranger` it only opens a new cmd but doesnt apply the parameters, ie. i have to manually type in `wsl ranger`. – PatrickSteiner Jul 03 '20 at 08:00
0

Found the solution!

Step 1: Find the executable:

C:\Users\[USER]>where wsl
C:\Windows\System32\wsl.exe

Step 2: Setting up launcher: enter image description here

Thanks to Ken Y-N for the documentation!


For interested parties: Have a look on "How to launch Windows apps from Ranger WSL?".

PatrickSteiner
  • 495
  • 4
  • 26