Xsrv is a lightweight X server for Windows that is designed to work seamlessly with Windows Subsystem for Linux (WSL). In this tutorial, we will guide you on how to install Xsrv on OpenSUSE latest.
sudo zypper update
sudo zypper install xorg-x11-server-Xorg
sudo systemctl status display-manager
If Xsrv service is running then you have successfully installed Xsrv on OpenSUSE. You can now use it to run graphical applications from your WSL environment.
Before you can use Xsrv to run graphical applications from WSL, you need to configure it to allow incoming connections from the WSL environment.
sudo nano /etc/wsl.conf
[interop]
appendWindowsPath=true
Save the changes by pressing "Ctrl + X", then "Y", and finally "ENTER".
Next, you need to enable the Windows Defender Firewall rule for the Xsrv server. To do this, run the following command in a PowerShell prompt on Windows:
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -Program "%SystemRoot%\System32\wsl.exe" -Action Allow
export DISPLAY=:0
xclock
If everything is set up properly, you should see the Xclock application window appear on the OpenSUSE desktop.
Congratulations! You have successfully installed Xsrv on OpenSUSE and configured it to work with WSL. You can now use it to run graphical applications from your WSL environment.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!