openSUSE Desktop on WSL2: Complete XRDP Setup Guide

openSUSE Desktop on WSL2: Complete XRDP Setup Guide architecture diagram

openSUSE brings enterprise-grade stability (Leap) or cutting-edge packages (Tumbleweed) to WSL2. The setup has unique quirks—zypper patterns, WSL-specific package conflicts, and potential user creation issues—but once configured, you get a solid SUSE desktop experience.

Why openSUSE on WSL2?

  • Leap—stable, enterprise-aligned releases (great for work)
  • Tumbleweed—rolling release with latest packages
  • YaST—powerful system configuration tool
  • zypper—excellent package manager with patterns
  • SUSE/RHEL skills—enterprise Linux experience

Prerequisites

  • Windows 10 (version 2004+) or Windows 11
  • WSL2 installed and working
  • openSUSE Leap or Tumbleweed from Microsoft Store or WSL UI

Installing openSUSE

openSUSE is available in the Microsoft Store as both Leap (stable) and Tumbleweed (rolling). Install through WSL UI for easier management.

Installing openSUSE Leap via WSL UI

Or via command line:

powershell
wsl --install -d openSUSE-Leap-16.0 # or wsl --install -d openSUSE-Tumbleweed

User Creation Issue (Leap 16.0)

openSUSE Leap 16.0 may fail to create a regular user during WSL installation. If you're logged in as root by default:

bash
# Create user with sudo access useradd -m -s /bin/bash -G users yourname passwd yourname # Add passwordless sudo (openSUSE doesn't have wheel group by default) echo "yourname ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/yourname chmod 440 /etc/sudoers.d/yourname # Set as default WSL user cat >> /etc/wsl.conf << 'EOF' [user] default=yourname EOF

Restart WSL:

powershell
wsl --terminate openSUSE-Leap-16.0

Step 1: Remove WSL Tmpfiles Package

openSUSE's WSL image includes patterns-wsl-tmpfiles which creates the X11 socket symlink for WSLg. This conflicts with XFCE installation and breaks XRDP.

When zypper shows a conflict, choose "Solution 1: deinstallation of patterns-wsl-tmpfiles":

bash
sudo zypper remove patterns-wsl-tmpfiles

Step 2: Install XFCE Desktop

openSUSE uses patterns for desktop environments:

bash
sudo zypper install -t pattern xfce

Step 3: Install XRDP

bash
sudo zypper install xrdp

Step 4: Configure XRDP

Change the Port

bash
sudo sed -i 's/^port=3389/port=3390/' /etc/xrdp/xrdp.ini
bash
[ -L /tmp/.X11-unix ] && sudo rm /tmp/.X11-unix sudo mkdir -p /tmp/.X11-unix && sudo chmod 1777 /tmp/.X11-unix

Step 5: Create Session File

bash
echo "startxfce4" > ~/.xsession

Step 6: Disable lightdm

openSUSE may have a display manager running—disable it since we're using XRDP:

bash
sudo systemctl disable lightdm

Step 7: Enable and Start XRDP

bash
sudo systemctl enable xrdp xrdp-sesman --now

Step 8: Connect

  1. Open Remote Desktop Connection on Windows (Win+R, type mstsc)
  2. Enter localhost:3390
  3. Log in with your openSUSE username and password

openSUSE XFCE desktop running in WSL2 via XRDP

Quick Reference

bash
# If running as root, create user first useradd -m -s /bin/bash -G users yourname && passwd yourname echo "yourname ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/yourname chmod 440 /etc/sudoers.d/yourname echo -e "[user]\ndefault=yourname" >> /etc/wsl.conf # Then: wsl --terminate openSUSE-Leap-16.0 # As regular user sudo zypper remove patterns-wsl-tmpfiles sudo zypper install -t pattern xfce sudo zypper install xrdp sudo sed -i 's/^port=3389/port=3390/' /etc/xrdp/xrdp.ini echo "startxfce4" > ~/.xsession [ -L /tmp/.X11-unix ] && sudo rm /tmp/.X11-unix && sudo mkdir -p /tmp/.X11-unix && sudo chmod 1777 /tmp/.X11-unix sudo systemctl disable lightdm sudo systemctl enable xrdp xrdp-sesman --now # Connect: mstsc → localhost:3390

openSUSE-Specific Gotchas

IssueSolution
Running as rootCreate user manually (no wheel group—use sudoers.d)
XFCE pattern conflictsRemove patterns-wsl-tmpfiles first
Black screenFix X11 socket symlink
zypper asks about conflictsChoose "Solution 1: deinstallation"

Available Desktop Patterns

openSUSE offers several desktop options:

bash
# List available patterns sudo zypper search -t pattern | grep -i desktop # Common options: # xfce - XFCE (recommended) # kde - KDE Plasma # gnome - GNOME # mate - MATE # lxqt - LXQt

Troubleshooting

For deeper issues—black screens, authentication problems, display errors—see the comprehensive WSL2 Desktop Troubleshooting Guide.

This Series

← Back to all posts