WSL2 (Windows Subsystem for Linux 2) is a powerful tool that allows you to run a Linux distribution, such as Kali Linux, directly on your Windows 10 machine. With the addition of Win-Kex (Windows + Kali Desktop Experience), you can enjoy a seamless integration between your Windows and Kali Linux environments. However, you may encounter an issue where Kali-Win-Kex always launches the desktop in seamless mode. In this article, we will explore this problem and provide a solution.
Understanding Seamless Mode
Seamless mode is a feature in Kali-Win-Kex that allows you to run Linux applications alongside your Windows applications, as if they were native Windows programs. This means that the Linux desktop is not displayed as a separate window, but rather integrated into your Windows desktop. While seamless mode can be convenient for some users, it may not be the preferred option for everyone.
The Problem: Always Launching in Seamless Mode
If you find that Kali-Win-Kex always launches the desktop in seamless mode, it can be frustrating, especially if you prefer the traditional Linux desktop experience. This issue might occur due to a misconfiguration or a bug in the system. However, there is a simple solution to force Kali-Win-Kex to launch in a windowed mode.
The Solution: Launching Kali-Win-Kex in Windowed Mode
To launch Kali-Win-Kex in windowed mode instead of seamless mode, you need to modify the configuration file and disable the seamless mode setting. Follow the steps below:
- Open the Windows Start menu and search for "Notepad". Right-click on Notepad and select "Run as administrator".
- In Notepad, click on "File" in the menu bar and select "Open".
- Navigate to the following directory:
C:\Users\[Your Username]\AppData\Local\Packages\KaliLinux.54290C8133FEE_ey8k8hqnwqnmg\LocalState. Please note that the folder name may vary slightly depending on your system. - In the file explorer window, change the file type from "Text Documents (*.txt)" to "All Files (*.*)".
- Look for a file named
kali-win-kex.confand double-click on it to open it in Notepad. - Within the file, locate the line that says
#kali-win-kex seamless=1. - Remove the "#" symbol at the beginning of the line to uncomment it.
- Change the value from
1to0, so the line should now readkali-win-kex seamless=0. - Save the file and exit Notepad.
Now, when you launch Kali-Win-Kex, it should open in windowed mode instead of seamless mode.
Running Kali Linux in WSL2 with Win-Kex can be a great way to combine the power of Linux with the convenience of Windows. However, if you prefer a windowed mode instead of seamless mode, you can easily modify the configuration file to achieve that. By following the steps outlined in this article, you can enjoy the traditional Linux desktop experience within the Windows environment.
References
| Source | Link |
|---|---|
| WSL2 Documentation | https://docs.microsoft.com/en-us/windows/wsl/ |
| Kali Linux | https://www.kali.org/ |