How to Install Xsrv on Fedora CoreOS Latest
Xsrv is an X server that runs on Microsoft Windows, created by Colin Harrison. Fedora CoreOS is a minimal operating system designed for running containerized workloads. In this tutorial, you will learn how to install Xsrv on Fedora CoreOS Latest.
Prerequisites
To follow this tutorial, you will need:
- A computer running Microsoft Windows with Xsrv installed.
- Access to a terminal on Fedora CoreOS Latest.
Steps
Open a terminal on Fedora CoreOS Latest.
Check if X11 forwarding is enabled by running the following command:
$ echo $DISPLAYIf the command outputs nothing or an error message, X11 forwarding is not enabled. You can enable X11 forwarding by setting the
DISPLAYenvironment variable to the IP address of your Windows machine, followed by:0.Install the necessary packages by running the following command:
$ sudo rpm-ostree install xorg-x11-server-Xorg xinit x11-utils x11-appsConfigure Xorg by creating a file called
20-xorg.confin the/etc/X11/xorg.conf.d/directory with the following content:Section "Device" Identifier "VGA" Driver "modesetting" Option "AccelMethod" "none" EndSectionThis configuration disables graphics acceleration for improved compatibility with X11 clients.
Create a shell script called
run.shin your home directory with the following content:#!/bin/sh exec xinit -- /usr/bin/Xorg :0 -listen tcp vt$XDG_VTNRThis script starts Xorg on display
:0and listens on TCP/IP port6000.Make the shell script executable by running the following command:
$ chmod +x run.shOpen Xsrv on your Windows machine.
Set the display to the IP address of your Fedora CoreOS machine, followed by
:0. For example, if your Fedora CoreOS machine has IP address192.168.1.100, enter192.168.1.100:0into the "Display Number" field.Start Xorg by running the following command in the terminal on your Fedora CoreOS machine:
$ ./run.shThis will start Xorg and wait for X11 clients to connect.
Test Xsrv by running an X11 client such as
xeyes:
$ xeyes &
This should open a window with a pair of eyes that follow your mouse cursor.
Conclusion
Congratulations, you have successfully installed Xsrv on Fedora CoreOS Latest! You can now run X11 clients on your Fedora CoreOS machine and display them on your Windows machine using Xsrv.