X11 GUI forwarding from RHEL linux server to local Mac system

Rajathithan Rajasekar
2 min readJun 13, 2024
Photo by Michael Coury on Unsplash

Recently we provisioned a redhat-8 linux server in GCP Compute Engine for installation of an IBM product. The product featured GUI installation, console installation & a silent installation. We wanted to try the GUI installation method by forwarding the GUI component to local system.Even though X11 forwarding is not new , there is no clear documentation on how to do it for a MAC local system, So I thought this post would help.

Below are the steps that you need to take to do X11 forwarding.

Step:1 — Set up the “DISPLAY” env variable

vi ~/.zshrc

export DISPLAY=:0

echo $DISPLAY

Step:2 — Install the xquartz software. XQuartz is an open-source version of the X.Org X server, a display server for the X Window System that runs on macOS

brew install --cask xquartz

Step:3 — Open the xquartz application. This will create a socket connection file under /tmp/.X11-unix/X0. This socket connection is very essential

ls -l /tmp/.X11-unix/X0

Step:4 — Logon to the RHEL linux VM server and install the below x11 packages

sudo dnf -y install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils dbus-x11
sudo dnf -y install xorg-x11-apps
sudo yum -y install gtk2…

--

--

Rajathithan Rajasekar

I like to write code in Python . Interested in cloud , dataAnalysis, computerVision, ML and deepLearning. https://rajathithanrajasekar.medium.com/membership