Skip to content

Set TMPDIR to $XDG_RUNTIME_DIR/app/com.visualstudio.code - #606

Open
olivierlemasle wants to merge 1 commit into
flathub:masterfrom
olivierlemasle:tmpdir
Open

olivierlemasle wants to merge 1 commit into
flathub:masterfrom
olivierlemasle:tmpdir

Conversation

@olivierlemasle

Copy link
Copy Markdown

This sets TMPDIR to a tmpfs directory shared between the Flatpak vscode and the host, which fixes an issue when using Devcontainers features.

Fixes #605

TMPDIR is used by Node.js os.tmpdir() which is used by devcontainers CLI.

Setting TMPDIR to $XDG_RUNTIME_DIR/app/$FLATPAK_ID is proposed in Flatpak documentation.

This sets TMPDIR to a tmpfs directory shared between the Flatpak vscode
and the host, which fixes an issue when using Devcontainers features.

Note: TMPDIR is used by Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir)
which is used by [devcontainers CLI](https://github.com/devcontainers/cli/tree/eda6cf892e1440d1fbb454d6e457a2343113ded6).
@flathubbot

Copy link
Copy Markdown
Contributor

🚧 Test build enqueued.

@flathubbot

Copy link
Copy Markdown
Contributor

🚧 Started test build.

@flathubbot

Copy link
Copy Markdown
Contributor

Test build succeeded. To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/200866/com.visualstudio.code.flatpakref

@ghost ghost assigned ghost and unassigned ghost Jun 12, 2026
francoism90 added a commit to francoism90/com.visualstudio.code that referenced this pull request Sep 10, 2026
/tmp is always a private, sandbox-local tmpfs in Flatpak regardless of
--filesystem=host, so Node's os.tmpdir() (used by the devcontainers
CLI) writes build contexts there where the host-side podman
(run via host-spawn) can't see them. $XDG_RUNTIME_DIR/app/<app-id> is
the directory Flatpak actually shares with the host for this purpose,
per the Flatpak sandbox-permissions docs.

Cherry-picked from flathub#606, fixes flathub#605.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
francoism90 added a commit to francoism90/com.visualstudio.code that referenced this pull request Sep 10, 2026
/tmp is always a private, sandbox-local tmpfs in Flatpak regardless of
--filesystem=host, so Node's os.tmpdir() (used by the devcontainers
CLI) writes build contexts there where the host-side podman
(run via host-spawn) can't see them. $XDG_RUNTIME_DIR/app/<app-id> is
the directory Flatpak actually shares with the host for this purpose,
per the Flatpak sandbox-permissions docs.

Cherry-picked from flathub#606, fixes flathub#605.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

Cannot build devcontainers features

2 participants