Explore Kartoza

Try searching for: QGIS, Training, GeoNode, PostGIS

How to Run a Linux GUI Application on OSX Using Docker
Back to Blog
Docker MacOS
May 13, 2015 Gavin Fleming

How to Run a Linux GUI Application on OSX Using Docker

This guide enables running Linux GUI applications directly on macOS by utilizing Docker alongside X11 forwarding tools. The technique applies to any graphical Linux application within containerized environments.

How to Run a Linux GUI Application on OSX Using Docker

Docker

Overview

The article addresses running Linux GUI applications on macOS through Docker. The setup requires:

  • Installing Homebrew
  • Installing socat
  • Installing XQuartz
  • Installing Docker (via Kitematic beta)
  • Obtaining a Docker image with desired GUI application
  • Running the container with display forwarding

Installation Steps

Homebrew Installation

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

socat Installation

brew install socat

XQuartz is installed from the official package. Kinematic serves as the Docker client for macOS.

Retrieving QGIS Docker Image

docker pull kartoza/qgis-desktop

Running QGIS

Four startup steps are required:

  1. Start socat
  2. Launch XQuartz
  3. Open Kinematic
  4. Run the QGIS container

socat Command

socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:"$DISPLAY"

QGIS Container Launch

docker run --rm -e DISPLAY=192.168.0.3:0 \
    -i -t -v /Users/timlinux:/home/timlinux \
    kartoza/qgis-desktop qgis

The article demonstrates how “QGIS (from a Linux container)” can execute on macOS desktops, with applications for testing Docker-orchestrated environments.

Want to Learn More?

Explore our training courses or get in touch to discuss how we can help your organization.