Skip to content

docs: document xterm-ghostty terminfo fix for sudo#146

Merged
psadi merged 2 commits into
pkgforge-dev:mainfrom
codemedic:docs/terminfo-troubleshooting
May 16, 2026
Merged

docs: document xterm-ghostty terminfo fix for sudo#146
psadi merged 2 commits into
pkgforge-dev:mainfrom
codemedic:docs/terminfo-troubleshooting

Conversation

@codemedic
Copy link
Copy Markdown
Contributor

@codemedic codemedic commented May 13, 2026

Summary

  • Adds TROUBLESHOOTING.md, linked from the README, for the Error opening terminal: xterm-ghostty error that shows up when running terminal apps via sudo. Includes a bash snippet that extracts the terminfo entry from the AppImage and installs it on the host.

@psadi
Copy link
Copy Markdown
Collaborator

psadi commented May 14, 2026

Thanks @codemedic

We had a TROUBLESHOOTING.md file earlier and was removed here

Im ok re-create and link it in Readme

@Samueru-sama
Copy link
Copy Markdown
Member

The issue here is that sudo drops env variables as a safety measure, which means the TERMINFO env var is lost.

I believe this can be fixed by configuring sudo to preserve this env variable, note this will only work with sudo as I don't think doas has a method to preserve specific variables.

@Samueru-sama
Copy link
Copy Markdown
Member

Actually nvm, this won't work even if sudo is configured to preserve the variable.

FUSE by default creates mountpoints that only the user that created it can see, and not even root can see into them.

I ran into that issue when making an udev rule installer, I was not able to use sudo to copy the files from the appimage to host, I had to first copy them to home and then to the actual destination lol

@psadi
Copy link
Copy Markdown
Collaborator

psadi commented May 15, 2026

The only solution to this is when ncurses ships xterm-ghostty by default to all systems

@codemedic
Copy link
Copy Markdown
Contributor Author

Yeah, ncurses shipping it natively would be the clean fix. Until then, installing the terminfo entry on the host gets around both problems — the AppImage mount isn't in the picture at all, so sudo dropping the env var and FUSE not letting root in become non-issues.

Happy to move this into a TROUBLESHOOTING.md if that's the direction you want to go.

@codemedic
Copy link
Copy Markdown
Contributor Author

@psadi done — content is now in TROUBLESHOOTING.md, linked from the README. Shout if you want anything changed before merging.

@psadi psadi merged commit 0326e50 into pkgforge-dev:main May 16, 2026
1 check passed
@codemedic codemedic deleted the docs/terminfo-troubleshooting branch May 17, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants