[GH-ISSUE #649] Ignores TMPDIR and fails when /tmp is mounted as noexec #172

Open
opened 2026-03-02 23:45:04 +03:00 by kerem · 1 comment
Owner

Originally created by @0PandaDEV on GitHub (Feb 8, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/649

I have my /tmp mounted as noexec for security reasons. Regardless of that there should never an executable run from /tmp this is a bad practice and can lead to issues. Instead I suggest using .cache/opentui.

$ export TMPDIR=/var/tmp
$ opencode --print-logs 
INFO  2026-02-08T21:44:44 +210ms service=default version=1.1.53 args=["--print-logs"] opencode
INFO  2026-02-08T21:44:44 +2ms service=config path=/home/pandadev/.config/opencode/config.json loading
INFO  2026-02-08T21:44:44 +1ms service=config path=/home/pandadev/.config/opencode/opencode.json loading
INFO  2026-02-08T21:44:44 +0ms service=config path=/home/pandadev/.config/opencode/opencode.jsonc loading
ERROR 2026-02-08T21:44:44 +14ms service=default e=Failed to initialize OpenTUI render library: Failed to open library "/tmp/.58d7ef93f1fff57f-00000001.so": /tmp/.58d7ef93f1fff57f-00000001.so: failed to map segment from shared object rejection
ERROR 2026-02-08T21:44:44 +0ms service=default Error: Failed to initialize OpenTUI render library: Failed to open library "/tmp/.58d7ef93f1fff57f-00000001.so": /tmp/.58d7ef93f1fff57f-00000001.so: failed to map segment from shared object
Originally created by @0PandaDEV on GitHub (Feb 8, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/649 I have my /tmp mounted as noexec for security reasons. Regardless of that there should never an executable run from /tmp this is a bad practice and can lead to issues. Instead I suggest using `.cache/opentui`. ```log $ export TMPDIR=/var/tmp $ opencode --print-logs INFO 2026-02-08T21:44:44 +210ms service=default version=1.1.53 args=["--print-logs"] opencode INFO 2026-02-08T21:44:44 +2ms service=config path=/home/pandadev/.config/opencode/config.json loading INFO 2026-02-08T21:44:44 +1ms service=config path=/home/pandadev/.config/opencode/opencode.json loading INFO 2026-02-08T21:44:44 +0ms service=config path=/home/pandadev/.config/opencode/opencode.jsonc loading ERROR 2026-02-08T21:44:44 +14ms service=default e=Failed to initialize OpenTUI render library: Failed to open library "/tmp/.58d7ef93f1fff57f-00000001.so": /tmp/.58d7ef93f1fff57f-00000001.so: failed to map segment from shared object rejection ERROR 2026-02-08T21:44:44 +0ms service=default Error: Failed to initialize OpenTUI render library: Failed to open library "/tmp/.58d7ef93f1fff57f-00000001.so": /tmp/.58d7ef93f1fff57f-00000001.so: failed to map segment from shared object ```
Author
Owner

@kommander commented on GitHub (Feb 11, 2026):

That is not something opentui controls, that is a Bun issue with standalone executables, which extracts bundled libs to that dir and tried to dlopen from there.

<!-- gh-comment-id:3884390251 --> @kommander commented on GitHub (Feb 11, 2026): That is not something opentui controls, that is a Bun issue with standalone executables, which extracts bundled libs to that dir and tried to dlopen from there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#172
No description provided.