Skip to content

Add documentation for troubleshooting flatpak permission issues#20617

Closed
MisterSirCode wants to merge 2 commits intorust-lang:masterfrom
MisterSirCode:master
Closed

Add documentation for troubleshooting flatpak permission issues#20617
MisterSirCode wants to merge 2 commits intorust-lang:masterfrom
MisterSirCode:master

Conversation

@MisterSirCode
Copy link
Copy Markdown

Refer to #2873 (comment) and my issue #20616

This change adds documentation to the troubleshooting FAQ for any future users experiencing cargo file resolving errors with rust-analyzer due to their IDE lacking permission to see the cargo binaries.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 5, 2025
@MisterSirCode
Copy link
Copy Markdown
Author

MisterSirCode commented Sep 5, 2025

Documentation moved to the vs-code page

Feel free to edit any wording or detail improvements that should be made

@lnicola
Copy link
Copy Markdown
Member

lnicola commented Sep 8, 2025

Wait, isn't this the same as the suggestion right above?

If you want to use Flatpak in combination with rustup, the following steps might help:

  • using Flatseal, you must add an environment variable called PATH. Set its value to the output from above, appending :~/.cargo/bin, where ~ is the path to your home directory. You must replace ~, as it won’t be expanded otherwise.

@ptomato
Copy link
Copy Markdown

ptomato commented Sep 16, 2025

I think probably the suggestion given in VSCodium/vscodium#2027 (comment) is better - it doesn't require using the host's cargo installation.

I have the Codium flatpak in the system installation so I had to do it without --user, here's what worked for me:

flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//25.08
flatpak override --env=FLATPAK_ENABLE_SDK_EXT=rust-stable com.vscodium.codium

adding the FLATPAK_ENABLE_SDK_EXT variable is also something that could be done in the flatpak manifest.

@lnicola
Copy link
Copy Markdown
Member

lnicola commented Oct 14, 2025

@ptomato isn't that also right above in the docs? 😄

If you use a Flatpak SDK for Rust, it must be in your PATH:

  • install the SDK extensions with flatpak install org.freedesktop.Sdk.Extension.{llvm15,rust-stable}//23.08
  • enable SDK extensions in the editor with the environment variable FLATPAK_ENABLE_SDK_EXT=llvm15,rust-stable (this can be done using flatseal or flatpak override)

But please feel free to update it to a more modern SDK etc.

@ptomato
Copy link
Copy Markdown

ptomato commented Oct 15, 2025

My comment applied to the docs change in this PR, which didn't work for me. If my suggestion is already in the docs, great!

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 12, 2026

☔ The latest upstream changes (possibly #21804) made this pull request unmergeable. Please resolve the merge conflicts.

@lnicola lnicola closed this Mar 12, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2026
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.

4 participants