If you want to add a shortcut in the right-click popup menu in Windows File Explorer that opens a Linux GUI terminal for the current folder, follow the steps described below.
Set your Linux distro for X410
We're assuming you have already configured your Linux/WSL distro for working with X410. We'll be using Tilix in this example, and since Tilix expects a D-Bus daemon running in background, you should enable it as outlined in the following post.Sharing D-Bus among WSL2 Consoles
Get your favorite terminal emulator ready
In this example, we'll be adding Tilix terminal to Windows File Explorer. But you can use any Linux GUI terminal; you just need to change
tilix to the file name for your own Linux GUI terminal emulator.
sudo apt install tilix
Create a folder for WSL related scripts and assets
It can be any folder on any drive, but for the sake of simplicity, let's create it on 'C:' drive and name it 'wsl':
c:\wsl. If you've decided to use a different folder path, please make adjustments accordingly to the scripts and registry settings described in the next steps.
Create a Windows batch file (*.bat) for launching Tilix
@echo off REM ### Start X410 in Windowed Apps Mode. If X410 is already running in Desktop Mode, REM ### it'll be terminated first without any warning message box. start /B x410.exe /wm REM ### Start Tilix ubuntu2004.exe run "bash --login -c 'nohup tilix >/dev/null 2>&1 & sleep 1'"
For more information about creating a Windows batch file for launching Linux GUI apps, please read the following post.Directly opening Linux GUI apps from Windows batch files
Create a VBScript file for silently launching a Windows batch file
You can use the same VBScript file found in the Step 4 of the following post. You just need to make sure that the VBScript file is in the same folder as the batch file created in Step 4.Pin a Linux GUI app to Start or Taskbar
Create a registry file for setting up the right-click menu
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Classes\Directory] [HKEY_CURRENT_USER\Software\Classes\Directory\Background] [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell] [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\X410LinuxShell] @="Open X410 Linux shell here" [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\X410LinuxShell\command] @="wscript.exe \"C:\\wsl\\bat-launcher.vbs\" \"open-x410-linux-shell-here\" \"%V\"" [HKEY_CURRENT_USER\Software\Classes\Directory\shell] [HKEY_CURRENT_USER\Software\Classes\Directory\shell\X410LinuxShell] @="Open X410 Linux shell here" [HKEY_CURRENT_USER\Software\Classes\Directory\shell\X410LinuxShell\command] @="wscript.exe \"C:\\wsl\\bat-launcher.vbs\" \"open-x410-linux-shell-here\" \"%V\""
If you're not using the
c:\wsl folder for the scripts created in Step 4 and 5, please make sure to adjust the paths for 'open-x410-linux-shell-here.vbs' and 'open-x410-linux-shell-here.bat' according to your setup.
Once you have created a 'set-open-x410-linux-shell-here-menu.reg' file as shown above, you can import it to Windows registry by double-clicking it or by selecting» from its right-click popup menu.
Your Linux GUI terminal is now ready!
You can now directly open your Linux GUI terminal for the selected folder in Windows File Explorer; you simply need to right-click on a folder item or empty space where the current folder items are displayed and select» .