From 4d17925a0433a0acd8ec8d9ff2ef24374ea45303 Mon Sep 17 00:00:00 2001 From: Stephen Brown Date: Mon, 30 Mar 2026 15:21:45 +0100 Subject: [PATCH] docs: add note for LD_LIBRARY_PATH when manually installing ghostty with -fno-sys=gtk4-layer-shell --- docs/install/build.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/install/build.mdx b/docs/install/build.mdx index fe8b7773..0265b582 100644 --- a/docs/install/build.mdx +++ b/docs/install/build.mdx @@ -309,6 +309,15 @@ ensure that `~/.local/bin` is on your _system_ `PATH`. The desktop environment itself must have that path in the `PATH`. Google for your specific desktop environment and distribution to learn how to do that. +If you built ghostty with the flag `-fno-sys=gtk4-layer-shell` you may additionally +require the `LD_LIBRARY_PATH` environment variable to be set to `$HOME/.local/lib`. +To avoid however globally polluting `LD_LIBRARY_PATH` when launching from a desktop +environment, you can simply patch the installed ghostty elf with `patchelf`: + +```shell-session +patchelf --set-rpath '$ORIGIN/../lib' $HOME/.local/bin/ghostty +``` + For system-wide installs, we recommend `/usr` (likely requires `sudo`): ```shell-session