Skip to content

[Bug]: Linux AppImage leaks runtime environment into integrated terminal and can conflict with system libraries #10966

Closed as not planned

Description

@Vidhan31

Summary

On Linux, the T3 Code AppImage appears to leak AppImage runtime environment variables and mount paths into the integrated terminal. This can cause host/system programs launched from the T3 terminal to resolve AppImage-bundled libraries or otherwise behave differently from the same programs launched from a normal terminal.

This appears related to #1699 and #2509.

Environment

  • OS: Linux
  • Installation: T3 Code AppImage
  • T3 Code: latest stable release
  • Shell: zsh

Expected behavior

Programs launched from T3 Code's integrated terminal should use the host system environment and system libraries. AppImage-specific variables and mount paths should not leak into unrelated child processes.

Actual behavior

The integrated terminal can inherit AppImage runtime state such as APPIMAGE, APPDIR, OWD, ARGV0, and LD_LIBRARY_PATH entries pointing into /tmp/.mount_T3-*. AppImage mount paths may also appear in PATH.

This can cause system binaries launched from the T3 terminal to behave differently or potentially load incompatible libraries from the AppImage instead of the host system.

Diagnostics

env | grep -E '^(APPIMAGE|APPDIR|OWD|ARGV0|LD_LIBRARY_PATH)='
printf '%s\n' "$LD_LIBRARY_PATH" | tr ':' '\n'

For a host executable:

ldd "$(command -v <program>)" | grep -E '/tmp/\.mount_|/usr/lib|/lib'

Suggested fix

Before spawning the integrated terminal/PTy shell on Linux:

  • remove ARGV0, APPIMAGE, APPDIR, and OWD
  • remove /tmp/.mount_* entries from PATH
  • remove /tmp/.mount_* entries from LD_LIBRARY_PATH

This should ideally be handled by T3 Code itself rather than requiring users to modify their shell configuration.

Why this matters

The same host binary can work normally outside T3 Code but fail inside the integrated terminal, making these failures subtle and difficult to debug.

Temporary workaround

env -u ARGV0 -u APPIMAGE -u APPDIR -u OWD -u LD_LIBRARY_PATH zsh

A proper application-level fix would be preferable.

Activity

  1. juliusmarminge commented on Sep 9, 2026

    @juliusmarminge
    Member

    Closing as a duplicate of #1699. Same AppImage launcher env leaking into the integrated terminal (ARGV0 / APPIMAGE / APPDIR / OWD, plus mount paths in PATH / LD_LIBRARY_PATH); #1699 is the canonical thread (also covered #2509).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions