User Tools

Site Tools


macos:util:xquartz

This is an old revision of the document!


Table of Contents

XQuartz

XQuartz is a X11 server for macOS.

Setup

Setup on macOS 26 includes:

  1. install it with Homebrew: brew install --cask xquartz;
  2. in macOS system settings allow running it in background;
  3. try to find optimal XQuartz settings for your goals (for me see below).

The best XQuartz settings for my purposes were:1)

{
    "NSWindow Frame x11_apps" = "0 78 1512 871 0 0 1512 949 ";
    "NSWindow Frame x11_prefs" = "94 406 550 369 0 0 1512 949 ";
    SULastCheckTime = "2026-09-14 16:06:19 +0000";
    SUUpdateGroupIdentifier = 1688699947;
    "app_to_run" = "/opt/X11/bin/xterm";
    "apps_menu" =     (
                (
            "xfce4-terminal (host)",
            "ssh user@host xfce4-terminal",
            ""
        )
    );
    "cache_fonts" = 1;
    "done_xinit_check" = 1;
    "enable_iglx" = 0;
    "enable_key_equivalents" = 0;
    "login_shell" = "/bin/sh";
    "no_auth" = 0;
    "nolisten_tcp" = 0;
    "option_sends_alt" = 0;
    "startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
    "sync_keymap" = 0;
}

This way i was able to change X11 keyboard settings using an own ~./Xmodmap.

To change the start-up application away from “xterm” you must use a terminal (CLI), for example:
defaults write org.xquartz.X11 app_to_run /usr/bin/true

SSH Client

I use XQuartz to run XFCE4 apps on a remote Linux server by using SSH:

ssh -Y "user@server" app

The following applications i run successfully so far:

  • xterm
  • xev
  • xfig
  • xpdf
  • (GNU) emacs
  • gimp
  • thunar
  • mx-tools
  • xfce4-terminal
  • xfce4-session (very slow, lot of warnings/errors)

SSH Server

On MX Linux server (which uses systemd at my site) i did:

  • change /etc/hostname and /etc/hosts accordingly;
  • install OpenSSH (SSH server);
  • allow X11 forwarding in /etc/ssh/sshd_config:
    X11Forwarding yes
    X11UseLocalhost yes
  • configure to start SSH daemon automatically:
    sudo systemctl start ssh.service
  • change /etc/systemd/logind.conf (not to power-down my laptop on lid close):
    HandleLidSwitchExternalPower=ignore
1)
Requested via command line by: defaults read org.xquartz.X11.
macos/util/xquartz.1789752324.txt.gz · Last modified: by Ralf Hoppe