Skip to content

Instantly share code, notes, and snippets.

View adventurist's full-sized avatar

Emmanuel Buckshi adventurist

View GitHub Profile
@paul-krohn
paul-krohn / docker_x11_macOS.md
Last active March 23, 2024 09:30
Docker X11 macOS

Preamble

There is a longstanding issue/missing feature/bug with sockets on Docker on macOS; it may never work; you'll need to use a network connection between Docker containers and X11 on macOS for the foreseeable future.

I started from this gist and made some adjustments:

  • the volume mappings aren't relevant/used, due to the socket issue above.
  • this method only allows X11 connections from your Mac, not the entire local network, which would include everyone on the café/airport WiFi.
  • updated to include using the host.docker.internal name for the the container host, instead.
  • you have to restart XQuartz after the config change.
@tzutalin
tzutalin / Log.h
Last active October 9, 2020 00:26
Simple Log.h in C++
#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
namespace da{
struct nullstream: std::ostream{
nullstream(): std::ostream(0){}
};