When you first install a Linux distro in WSL2, it's missing many essential libraries and executables for running Linux GUI apps. Luckily, when you install any Linux GUI app, the software package manager (ex. apt) in your Linux distro automatically installs additional components as they are required. Instead of installing individual apps, you can also simply install a desktop meta-package that already includes popular Linux GUI apps and provides consistent look-and-feel for those apps (ex. colors, icons, etc.).
We already have the following post about running Ubuntu DE (desktop environment) in WSL2. In that post, X410 is in Desktop mode, and you can have a full Ubuntu desktop experience.
Running Ubuntu Desktop in WSL2
However, if you want to use those Linux GUI apps installed with Ubuntu DE like Windows apps, it's straightforward and easy to do with X410; simply stop after completing the Step 8 in the above post!
We prepared that post to share the same steps as many as possible for both Desktop and Windowed Apps modes in X410. Once you completed Step 8 where WSL is restarted, you're ready to launch Linux GUI apps directly from Ubuntu/WSL2 console. You just need to set X410 in Windowed Apps mode.
Ubuntu DE includes Firefox and when you launch it from an Ubuntu/WSL2 console in Windowed Apps mode, you may not be able to grab its border and resize the window. Firefox seems to be setting its border and title bar style according to
XDG_CURRENT_DESKTOP environment variable. We set that variable to
ubuntu:GNOME in the Step 5 of our setup and that is causing the issue. If you're having this problem, simply set a new environment variable
MOZ_GTK_TITLEBAR_DECORATION to 'client' as shown below before launching Firefox.
The following post has more information about
Opening Firefox in WSL2 without Windows default title bar
MOZ_GTK_TITLEBAR_DECORATION environment variable.