Thunar is a file manager for Linux and other Unix-like systems
sudo apt install thunar thunar-archive-plugin thunar-media-tags-plugin
- Go to "Edit > Configure custom actions..."
- Add a new custom action.
- Enter the following settings:
[Basic]
Name & Description:
Open Windows Explorer Here
Command:
explorer.exe $(echo %f | awk -F '/' '{print $NF}')
[Appearance Conditions]
File Patther:
*
Appears if selection contains:
Directories
- Go to "Edit > Configure custom actions..."
- Add a new custom action.
- Enter the following settings:
[Basic]
Name & Description:
Open Windows Explorer in Parent Directory
Command:
explorer.exe .
[Appearance Conditions]
File Patther:
*
Appears if selection contains:
Text Files, Audio Files, Video Files, Image Files, Other Files
-
Press Windows key + R and run "regedit" to open Registry Editor.
-
Go to "Computer\HKEY_CLASSES_ROOT\Directory\Background\shell"
- Right-click "shell" and select "New > Key"
- Name the newly created key as "Thunar"
- Set the value of "(Default)" as "Open with Thunar"
- INSIDE Thunar, right-click and select "New > String Value"
- Name the newly created string as "Icon" and set the value as "C:\Users\elira\wslu\Thunar.ico"
- Right-click "Thunar" and select "New > Key"
- Name the newly created key as "command"
- Set the value of "(Default)" as:
C:\Windows\System32\wscript.exe C:\\Users\\elira\wslu\runHidden.vbs "C:\\Users\\elira\\AppData\\Local\\Microsoft\\WindowsApps\\WhitewaterFoundryLtd.Co.16571368D6CFF_kd1vv0z0vy70w\\pengwin.exe" run "cd $(echo '\"%V\"' | sed -E -e 's/([A-Z]):\\/mnt\/\L\1\//' -e 's/\\/\//g'); bash -l -c thunar"
Remarks:
- The line above have been modified for rendering escape character \ on github page. If you are reading this text in raw format, all double \ should be single when you enter the command in registry editor.
- Replace "elira" in the above command with your username.
- The most important part of the command is run "cd $(echo '\"%V\"' | sed -E -e 's/([A-Z]):\\/mnt\/\L\1\//' -e 's/\\/\//g'); bash -l -c thunar". You can copy the long string before the word "run" from a startmenu shortcut created by pengwin-setup. You can check the string by right-clicking a shortcut file and select "Properties".
- Go to "Computer\HKEY_CLASSES_ROOT\Directory\shell"
- Right-click "shell" and select "New > Key"
- Name the newly created key as "Thunar"
- Set the value of "(Default)" as "Open with Thunar"
- INSIDE Thunar, right-click and select "New > String Value"
- Name the newly created string as "Icon" and set the value as "C:\Users\elira\wslu\Thunar.ico"
- Right-click "Thunar" and select "New > Key"
- Name the newly created key as "command"
- Set the value of "(Default)" as:
C:\Windows\System32\wscript.exe C:\\Users\\elira\wslu\runHidden.vbs "C:\\Users\\elira\\AppData\\Local\\Microsoft\\WindowsApps\\WhitewaterFoundryLtd.Co.16571368D6CFF_kd1vv0z0vy70w\\pengwin.exe" run "cd $(echo '\"%V\"' | sed -E -e 's/([A-Z]):\\/mnt\/\L\1\//' -e 's/\\/\//g'); bash -l -c thunar"
Remarks:
- The line above have been modified for rendering escape character \ on github page. If you are reading this text in raw format, all double \ should be single when you enter the command in registry editor.
- Replace "elira" in the above command with your username.
- The most important part of the command is run "cd $(echo '\"%V\"' | sed -E -e 's/([A-Z]):\\/mnt\/\L\1\//' -e 's/\\/\//g'); bash -l -c thunar". You can copy the long string before the word "run" from a startmenu shortcut created by pengwin-setup. You can check the string by right-clicking a shortcut file and select "Properties".
https://github.com/eliranwong/wsl2#open-a-file-on-wsl-with-default-windows-application