Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ Since AppImages are self-contained executables, there is no formal installation

</details>

## 🛠️ Troubleshooting

See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for known issues and fixes.

## 🤝 Contributing

Contributions & Bugfixes are welcome. If you like to contribute, please feel free to fork the repository and submit a pull request.
Expand Down
30 changes: 30 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Troubleshooting

## `Error opening terminal: xterm-ghostty` when using `sudo`

Ghostty sets `TERM=xterm-ghostty`, but the terminfo entry is bundled inside the AppImage and is not installed on the host system. When you run a terminal application via `sudo` (e.g., `sudo aptitude`, `sudo vim`), the root environment cannot find the terminfo entry and fails with:

```
Error opening terminal: xterm-ghostty.
```

**Fix:** extract the terminfo entry from the AppImage and install it system-wide.

```bash
# Extract the terminfo entry into a temporary directory
tmpdir=$(mktemp -d /tmp/ghostty-appimage.XXXXXX)
(cd "$tmpdir" && /path/to/Ghostty.AppImage --appimage-extract share/terminfo/x/xterm-ghostty)

# Install for the current user
mkdir -p ~/.local/share/terminfo/x
cp "$tmpdir/squashfs-root/share/terminfo/x/xterm-ghostty" ~/.local/share/terminfo/x/

# Install system-wide so root and sudo can find it
sudo mkdir -p /usr/share/terminfo/x
sudo cp "$tmpdir/squashfs-root/share/terminfo/x/xterm-ghostty" /usr/share/terminfo/x/

# Clean up
rm -rf "$tmpdir"
```

This only needs to be done once, or again after upgrading to a new AppImage release.