Skip to content

Instantly share code, notes, and snippets.

@jondkinney
Last active October 20, 2025 20:22
Show Gist options
  • Select an option

  • Save jondkinney/1b60752521463e31772c689404660df7 to your computer and use it in GitHub Desktop.

Select an option

Save jondkinney/1b60752521463e31772c689404660df7 to your computer and use it in GitHub Desktop.
Install Ghostty on Omarchy ARM Virtual Machine VM

Installing Ghostty on ARM-based VMs (Parallels/VMware)

This guide covers installing Ghostty terminal emulator on ARM64 (aarch64) virtual machines like Parallels Desktop or VMware Fusion running Arch Linux ARM.

Prerequisites

  • Arch Linux ARM running in a VM (Parallels, VMware, etc.)
  • AUR helper or manual build capability
  • git, base-devel, and sudo access

Common Issues on ARM VMs

  1. OpenGL Context Errors: VMs often lack proper OpenGL support
  2. Zig Version Mismatch: Ghostty requires Zig 0.15.2+, official repos may have older versions
  3. Missing Dependencies: Some dependencies need special handling

Installation Steps

1. Install Official Repo Dependencies

sudo pacman -S --needed blueprint-compiler git base-devel

2. Install Pandoc (provides pandoc-cli)

Since pandoc-cli doesn't exist as a standalone package, install pandoc-bin from AUR:

# Using omarchy-aur-install or your preferred AUR helper
omarchy-aur-install pandoc-bin
# OR
yay -S pandoc-bin
# OR
paru -S pandoc-bin

3. Install Zig 0.15.2

Ghostty requires Zig 0.15.2+. Since official repos may have older versions:

Option A: Manual Installation (Recommended for VMs)

cd /tmp
curl -L -O https://ziglang.org/download/0.15.2/zig-aarch64-linux-0.15.2.tar.xz
tar -xf zig-aarch64-linux-0.15.2.tar.xz
sudo mv zig-aarch64-linux-0.15.2 /usr/local/
sudo ln -sf /usr/local/zig-aarch64-linux-0.15.2/zig /usr/local/bin/zig

# Verify
zig version  # Should show 0.15.2

Option B: AUR Package (if compatible)

omarchy-aur-install zig-bin

4. Install Ghostty from AUR

omarchy-aur-install ghostty-git
# OR
yay -S ghostty-git

5. Fix OpenGL Context Error (Required for VMs)

VMs typically can't acquire OpenGL contexts. Create a wrapper script to force software rendering:

# Create wrapper script
mkdir -p ~/.local/share/omarchy/bin

cat > ~/.local/share/omarchy/bin/ghostty << 'EOF'
#!/bin/bash
# Ghostty wrapper - Forces software rendering for VM compatibility

# Force GTK to use Cairo software renderer instead of OpenGL
export GSK_RENDERER=cairo

# Also try software rendering for Mesa (if applicable)
export LIBGL_ALWAYS_SOFTWARE=1

# Execute the real ghostty binary
exec /usr/bin/ghostty "$@"
EOF

chmod +x ~/.local/share/omarchy/bin/ghostty

6. Update Desktop File

Create a local desktop file override to use the wrapper:

mkdir -p ~/.local/share/applications

cat > ~/.local/share/applications/com.mitchellh.ghostty.desktop << 'EOF'
[Desktop Entry]
Version=1.0
Name=Ghostty
Type=Application
Comment=A terminal emulator
TryExec=$HOME/.local/share/omarchy/bin/ghostty
Exec=$HOME/.local/share/omarchy/bin/ghostty --gtk-single-instance=true
Icon=com.mitchellh.ghostty
Categories=System;TerminalEmulator;
Keywords=terminal;tty;pty;
StartupNotify=true
StartupWMClass=com.mitchellh.ghostty
Terminal=false
Actions=new-window;
X-GNOME-UsesNotifications=true
X-TerminalArgExec=-e
X-TerminalArgTitle=--title=
X-TerminalArgAppId=--class=
X-TerminalArgDir=--working-directory=
X-TerminalArgHold=--wait-after-command
DBusActivatable=true
X-KDE-Shortcuts=Ctrl+Alt+T

[Desktop Action new-window]
Name=New Window
Exec=$HOME/.local/share/omarchy/bin/ghostty --gtk-single-instance=true
EOF

# Update desktop database
update-desktop-database ~/.local/share/applications

7. Verify Installation

# Test from command line
ghostty --version

# Launch GUI
ghostty &

# Check you're in Ghostty (from within the new terminal)
echo $GHOSTTY_RESOURCES_DIR  # Should output: /usr/share/ghostty

Troubleshooting

"Unable to acquire an OpenGL context" Error

Solution: Make sure you created the wrapper script in step 5.

Alternative renderers to try (edit the wrapper script):

export GSK_RENDERER=ngl      # New GL renderer
# OR
export GSK_RENDERER=vulkan   # Vulkan backend (if available)

Slow Performance with Cairo Renderer

  1. Enable 3D acceleration in VM settings:

    • Parallels: Configure → Hardware → Graphics → Enable 3D acceleration
    • VMware: Settings → Display → Accelerate 3D graphics
  2. Install Mesa drivers:

    sudo pacman -S mesa mesa-utils

Zig Build Errors

Error: Your Zig version v0.15.1 does not meet the required build version of v0.15.2

Solution: Make sure you installed Zig 0.15.2 exactly (step 3)

Error: expected LLVM 21.x but found 20.x

Solution: Use manual Zig installation (Option A in step 3) instead of building from source

AUR Package Dependency Errors

Error: Clone failed for 'libfontconfig' or similar library errors

Solution: This was a bug in some AUR helpers. The libraries are already provided by official packages like fontconfig, freetype2, glib2, etc. If using omarchy-aur-install, make sure it's updated with the fix from this guide.

Known Limitations

  • Performance: Software rendering (Cairo) is slower than hardware OpenGL but necessary for VM compatibility
  • GPU features: Some advanced GPU features may not work in VMs
  • 3D effects: Background blur and similar effects may not work properly

Verifying You're in Ghostty vs Other Terminals

Create a quick detection script:

cat > ~/.local/share/omarchy/bin/which-terminal << 'EOF'
#!/bin/bash
if [ -n "$GHOSTTY_RESOURCES_DIR" ]; then
    echo "🟢 Ghostty"
elif pstree -s $$ 2>/dev/null | grep -q alacritty; then
    echo "🔵 Alacritty"
elif pstree -s $$ 2>/dev/null | grep -q kitty; then
    echo "🟡 Kitty"
else
    echo "❓ Unknown ($TERM)"
fi
EOF
chmod +x ~/.local/share/omarchy/bin/which-terminal

# Usage
which-terminal

Environment-Specific Variables

When running in Ghostty, these variables are set:

  • GHOSTTY_RESOURCES_DIR=/usr/share/ghostty
  • TERM=xterm-256color (or ghostty if using Ghostty's terminfo)

Additional Resources

Version Info

This guide was tested with:

  • OS: Arch Linux ARM (aarch64)
  • Ghostty: 1.2.0-r609.g2696d50-1
  • Zig: 0.15.2
  • VM: Parallels Desktop (ARM64)
  • Date: October 2025

If you encounter issues not covered here, check the Ghostty issue tracker or the AUR package comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment