Fedora Remix for WSL 38 Released

Fedora 38.0.0:

  • Upgraded to Fedora 38

  • Upgraded to Mesa 23.0.2 with OpenGL 4.0 and GPU video decode

Upgrade Fedora Remix for WSL to 38

You can upgrade your existing installation of Fedora 37 with the following steps.

First, backup your installation:

wsl --export fedoraremix fedoraremix37_backup.tar.gz

Then proceed:

NOTE: DO NOT PERFORM THE UPGRADE STARTING FEDORA REMIX WITH SYSTEMD; IT WILL RUIN YOUR INSTALLATION

#Be sure that systemd is disabled
[ "$(grep -c "^systemd.*=.*true$" /etc/wsl.conf)" -ne 0 ] && sudo sed -i "s/^systemd.*=.*true$/systemd=false/" /etc/wsl.conf && wsl.exe --terminate ${WSL_DISTRO_NAME}

update.sh 
sudo dnf -y upgrade --refresh  
sudo dnf -y install dnf-plugin-system-upgrade  
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/raw/rawhide/f/RPM-GPG-KEY-fedora-38-primary  
sudo dnf -y install distribution-gpg-keys 
sudo dnf -y system-upgrade --allowerasing --skip-broken download --releasever=38  
sudo dnf -y system-upgrade reboot

At this point, it will raise an error, ignore it, and execute the following commands:

sudo dnf -y system-upgrade upgrade   
sudo dnf -y autoremove   
sudo dnf -y clean all   
sudo mandb  
update.sh  
cat /etc/fedora-release
exit

You can then reenable or start with SystemD if you were using it.

Enjoy it!

Announcing built-in SystemD support in Fedora Remix for WSL

SystemD is not supported officially in WSL and the lack of it imposes the following limits:

  • Services cannot be started using the familiar systemctl and the daemons must be started manually.

  • For RedHat and SUSE like distros, neither the service command can be used to start services.

  • Use snaps

  • Run Gnome desktop

Fedora Remix WSL 35.13.5 includes SystemD support

Traditionally bringing SystemD to WSL implied using workarounds or scripts to be able to start the systemd daemon with a process id 0. We based our implementation on one of them, the one-script-wsl2-systemd by Dani Llewellyn. Upon updating to the 35.13.5 version you’ll see the following changes:

  • A new start menu entry called Fedora Remix for WSL

 
 
  • A new menu entry in Windows Terminal

 
 
  • New options for run at Windows login

 
 

Starting SystemD

The SystemD support is completely optional and you can start it or not depending on what you need to do. You can use Start Menu shortcut, the Windows Terminal profile, via command line execute: fedoraremix -s, or inside a running instance sudo start-systemd

NOTE: You don’t need to wipe your actual installation, when you start SystemD for the first time it will update and everything for you into your existing instance.

Some examples

Ok, I have SystemD, now what? Let’s see some useful use cases:

The SSH server is started automatically

First, let’s get the IP address with ip address show dev eth0

And ssh into it

Sadly the WSL2 IP address changes on every restart. Let’s use hostnames instead:

  • Edit the /etc/wsl.conf to establish a custom hostname. Add a hostname entry in the [network] section with the hostname that you like

  • Install avahi with sudo dnf -y install avahi and enable it with sudo systemctl enable avahi-daemon

  • Stop Fedora Remix with wsl.exe --terminate fedoraremix

  • Start it again with SystemD.

  • Now connect using ssh but using the hostname

 

Install GNOME desktop

Let’s level it up and install a full desktop. First, edit the /etc/wsl.conf to establish a custom hostname. Add a hostname entry in the [network] section with the hostname that you like as we did in the previous example:

Now install Gnome using sudo dnf -y groupinstall 'Basic Desktop' GNOME. You can use also the Fedora Workstation group but it will install many things that probably you won’t need.

When it finish you’ll need to configure the locale with: localectl set-locale LANG="en_US.UTF-8"
The last step is to install the remote desktop support xrdp: sudo dnf -y install xrdp and enable it with sudo systemctl enable xrdp
Terminate fedoraremix and start it again with SystemD

If the terminate command fails, run it from PowerShell. Start Fedora Remix again with SystemD

Now open Remote Desktop Connection or Remote Desktop app from the store (recommended) and put the hostname that you defined in the Computer or PC name field. Also you can specify the username and if you want it to save the password

And here is

Install and run Snaps

Once you started with SystemD, you can install SnapD using the standard steps for Fedora:

  • Be sure that you started Fedora Remix with SystemD.

  • Run: sudo dnf -y install snapd

  • Create the symbolic link for the classic mode: sudo ln -s /var/lib/snapd/snap /snap

  • Check if everything is ok with: snap version

  • Install an example snap: sudo snap install hello-world

  • And run it: hello-world

If you see a bash: hello-world: command not found... start Fedora Remix again in SystemD mode

Installing a snap with GUI suppport

What about a graphical application? Let’s try with IntelliJ IDEA. sudo snap install intellij-idea-community --classic

IntelliJ IDEA installed as a snap in Fedora Remix for WSL

Note that for Windows 10 you’ll need a running X Server in Windows such as X410 or VcXsrv

Starting your services at Windows log-in

You can instruct Fedora Remix to run at Windows startup with SystemD thus starting your services. Just go to the App Settings and activate the preferred option. The No Window option won’t show any console upon start.

 
 

Starting services in Fedora Remix for WSL without using SystemD, also available for WSL1

Many services like SSH, Avahi, and XRDP don’t require SystemD in order to be run. But starting them manually can be tedious. This is why this update to Fedora Remix includes a script that can be used to start services using the systemctl syntax. We called it wslsystemctl and it is based on a solution made to start services in a docker container in an easy way. For more information on the source check: Docker SystemD Replacement

Starting SSH

  • Run sudo wslsystemctl start sshd-keygen@ecdsa.service only the first time to generate the key

  • Run sudo wslsystemctl start sshd

Starting your services at Fedora Remix start without SystemD

You can add the command sudo wslsystemctl default to your .bashrc so your services will be started.

echo "%wheel ALL=NOPASSWD: /usr/local/bin/wslsystemctl default" | sudo EDITOR="visudo" tee /etc/sudoers.d/start-services echo "sudo wslsystemctl default 2>/dev/null">> $HOME/.bashrc

Known issues

The SystemD integration is a work in progress and some things don’t run well or are incompatible. Our piece of advice is that use SystemD only when you really need it. Let’s see some of them and workarounds.

WSL Store edition

You may experience crashes or wsl shutdowns when using Remote Desktop and a desktop environment served via XRDP. Also, the interoperability between WSL and Windows begins to fail. The advice is if you experience stability problems uninstall the Store version.

WSLg and Qt applications

Out of the box, Qt applications will be rendered as black boxes in WSLg if Fedora Remix is started with SystemD, we are still working on that. The situation is worse if the application is packed as a snap. Some workarounds:

  • The best way is to bypass WSLg completely and use an X Server in Windows as we do in Windows 10. With the following command, WSLg will be disabled just for Fedora Remix: echo "unset DISPLAY" | sudo tee /etc/profile.d/00-no-wslg.sh

  • Another way is to use Wayland instead of XWayland; it won’t work with snaps unless the Wayland plugin is packed into the snap itself. For it, we need to install the Wayland plugin and define some environment variables

 
sudo dnf -y install qt5-qtwayland
export QT_QPA_PLATFORM=wayland
export XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
  • if you installed any desktop environment like in the previous examples, the Qt applications will run perfectly inside of it.

Start menu shortcuts won’t be generated for snap applications

We are working to bring an alternative for this, because SystemD must be started before trying to use the snaped application.

Acknowledgments 

🏆 Dani Llewellyn - for her hard work making it possible to have SystemD and Snaps together with WSLg with a single and easy-to-use script.

🏆 Guido U. Draheim - for creating a script that allows WSL users to start services without having to start SystemD, also helping WSL1 users.

🏆 carrizo - for integrating both scripts into the image and the update.sh script, and making it possible to call them transparently from the launcher.

Conclusion

There is still work to do but we want to know what you do with it, please share your impressions and use cases in the comments.

Enjoy it!!

Upgrade Fedora Remix for WSL to 35

Hello,

Today November 2, Fedora 35 was released

You can upgrade your existing installation of Fedora 34 with the following steps.

First, if you are in Windows 1903 or newer first backup your installation:

wsl --export fedoraremix fedoraremix34_backup.tar.gz

Then proceed:

upgrade.sh
sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/blob/rawhide/f/RPM-GPG-KEY-fedora-35-primary
sudo dnf install distribution-gpg-keys
sudo dnf system-upgrade --allowerasing --skip-broken download --releasever=35
sudo dnf system-upgrade reboot

At this point, it will raise an error, ignore it, and execute the following commands:

sudo dnf system-upgrade upgrade
sudo dnf -y autoremove
sudo dnf -y clean all
sudo mandb
upgrade.sh
cat /etc/fedora-release

exit

For Windows 11

If you have Windows 11, you can use WSLg in Fedora Remix. Let’s follow some steps so you can squeeze the best of this technology.

Tune Fedora Remix for WSL

Enable D-Bus

Many Linux apps rely on D-Bus to work properly. This support is installed in Fedora Remix for WSL running:

sudo dnf install dbus dbus-x11

Install your beloved GUI app using dnf, for example:

sudo dnf install terminator

It will create a Start Menu shortcut for it called in this case Terminator (fedoraremix)

Enjoy it!

Fedora Remix for WSL May Update with Windows Terminal theme

Fedora 34.5.5:

  • Automatically creates an entry with logo in Windows Terminal

  • Add default background and colors to Windows Terminal (you can change them in Settings)

If you have Windows Terminal 1.7 or newer when you run Fedora Remix, you will see a very nice color scheme, background, and menu logo without taking any action. The new built-in theme has the following defaults:

  • Starts in the Linux home directory instead of the Windows one.

  • Has default icon for the tab title and menu

  • Default background image with the Fedora Remix logo aligned to the bottom right and with an opacity of 15%

  • A Color Scheme that mimics the default color palette of Fedora Workstation, so you will feel at home.

  • Cursor type square as in Gnome Terminal

  • Font face Cascadia Code with ligatures

If you don’t like the defaults or part of them, you can simply change them in the Settings screen and they will be preserved.

Other changes in Fedora Remix for WSL include

  • In-App Settings, it is possible to set Fedora Remix launch at startup

  • When a new distro is created, now the default user is written in wsl.conf. So, the default user is preserved on exports and imports

  • Fixed a problem installing packages in WSL1

  • Upgraded WSLU to 3.2.3

Existing users can update immediately by running $ upgrade.sh.

Report bugs here.

Huge thanks to all contributors, and issue reporters.

-Carlos

Upgrade Fedora Remix for WSL to 34

Hello,

Today April 27, Fedora 34 was released: Fedora Linux 34 is officially here! - Fedora Magazine.

You can upgrade your existing installation of Fedora 33 with the following steps.

First, if you are in Windows 1903 or newer first backup your installation:

wsl --export fedoraremix fedoraremix33_backup.tar.gz

Then proceed:

upgrade.sh
sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/blob/rawhide/f/RPM-GPG-KEY-fedora-34-primary
sudo dnf install distribution-gpg-keys
sudo dnf system-upgrade --allowerasing --skip-broken download --releasever=34
sudo dnf system-upgrade reboot

At this point, it will raise an error, ignore it, and execute the following commands:

sudo dnf system-upgrade upgrade
sudo dnf -y autoremove
sudo dnf -y clean all
sudo mandb
upgrade.sh
cat /etc/fedora-release

exit

For Windows Insider Preview Build 21362+

If you have the latest insider version, you can use WSLg in Fedora Remix. Let’s follow some steps so you can squeeze the best of this technology.

WSLg installation

Once you have upgraded your Windows Insider to at least build 21362, you will need to upgrade your WSL installation.

  1. Be sure that Fedora Remix for WSL is already running in WSL 2. If not, first switch it with wsl --set-version fedoraremix 2. Then run wsl --shutdown

  2. Upgrade WSL running wsl --update from an elevated command prompt or PowerShell. And restart WSL with wsl --shutdown.

Installing the graphic driver in Windows

It recommended running WSLg on a system with virtual GPU (vGPU) enabled for WSL so you can benefit from hardware-accelerated OpenGL rendering. You can find a preview driver supporting WSL from each of our partners below.

For more information: GitHub - microsoft/wslg: Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios

Tune Fedora Remix for WSL

Upgrade Fedora Remix for WSL

After enabling WSLg support you will need to run the upgrade script again in order to have installed the accelerated GPU support:

upgrade.sh

Enable D-Bus

Many Linux apps rely on D-Bus to work properly. This support is installed in Fedora Remix for WSL running:

sudo dnf install dbus dbus-x11

Install your beloved GUI app using dnf, for example:

sudo dnf install terminator

It will create a Start Menu shortcut for it called in this case Terminator (fedoraremix)

Enjoy it!

Upgrade Fedora Remix for WSL to 33

Hello,

You can upgrade your existing installation of Fedora 32 with the following steps.

First, if you are in Windows 1903 or newer first backup your installation:

wsl --export fedoraremix fedoraremix32_backup.tar.gz

Then proceed:

upgrade.sh
sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/blob/rawhide/f/RPM-GPG-KEY-fedora-33-primary
sudo dnf install distribution-gpg-keys
sudo dnf system-upgrade --allowerasing --skip-broken download --releasever=33
sudo dnf system-upgrade reboot

At this point, it will raise an error, ignore it, and execute the following commands:

sudo dnf system-upgrade upgrade
sudo rpm --rebuilddb
sudo dnf -y autoremove
sudo dnf -y clean all
sudo mandb
upgrade.sh
cat /etc/fedora-release

exit

If you face an error like: "Failed to obtain the transaction lock (logged in as root).". Run this:

upgrade.sh

And repeat the last command that you attempted and keep following the steps.

Upgrade Fedora Remix for WSL to 32

Hello,

You can upgrade your existing installation of Fedora 31 with the following steps. To do a fresh install just run wsl --unregister fedoraremix and run fedoraremix.exe again:

First, if you are in Windows 1903 or newer first backup your installation:

wsl --export fedoraremix fedoraremix31_backup.tar.gz

Then proceed:

upgrade.sh
sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade --allowerasing --skip-broken download --releasever=32
sudo dnf system-upgrade reboot

At this point, it will raise an error, ignore it, and execute the following commands:

sudo dnf system-upgrade upgrade
sudo dnf -y autoremove
sudo dnf -y clean all
sudo mandb
cat /etc/fedora-release
exit

If you face an error like: "Failed to obtain the transaction lock (logged in as root).". Run this:

upgrade.sh

And repeat the last command that you attempted and keep following the steps.

Fedora Remix for WSL 30.1 Released

Fedora Remix for WSL 30.1 has been released as the first build of Fedora Remix for WSL from Fedora 30 packages.

30.1 includes the following changes:

  • Fresh build from the latest Fedora 30 packages.

  • It is no longer necessary to call dbus-uuidgen on installation.

  • glibc-langpack-en is installed by default to make locale stop complaining and glyphs in shells like fish appear correctly.

30.1 will be available in the Microsoft Store in the next 24-48 hours here.

Signed builds for side-loading can be downloaded here.

Fedora Remix for WSL supports both x86_64 and arm64 devices.

The Chocolatey package of Fedora Remix for WSL will be updated to Fedora 30 packages when version Fedora Remix for WSL 30.2 is released.

Existing Fedora Remix for WSL users can upgrade to Fedora 30 packages using:

$ sudo dnf upgrade --releasever=30 

File bug reports here.

-Hayden

IMG_0618.jpeg

Fedora Remix for WSL Build 28 Released

Fedora Remix for WSL build 28 is headed to the Microsoft Store, based on Fedora 29.

Build 28 is built with a new image creation process based on contributions by Neal Gompa.

Build 28 ships with wslutilities pre-installed developed by Whitewater Foundry lead dev Patrick Wu.

A bug in Fedora packaging tools discovered by Whitewater Foundry during the development of build 28 led to a patch in upstream

The official Chocolatey package of Fedora Remix for WSL will be updated with build 28. The Chocolatey package is maintained by Bill Curran.

This will be the final planned release of Fedora Remix for WSL based on Fedora 29. Fedora 30 is expected to land in early May. A Fedora Remix for WSL build based on Fedora 30 should arrive shortly thereafter.