Support Flatpak installations
Closed this issue · 2 comments
shayne commented
To support Flatpak we'll need to run commands via flatpak-spawn --host <command>
.
For detection, the env variables container=flatpak
and FLATPAK_ID=com.visualstudio.code
are set.
I tested flatpak-spawn --host pkexec tailscale status
, and it provided the visual password prompt and the command worked as expected.
marwan-at-work commented
After some digging, there is a larger issue: /var/run
in flatpak is not the same as the host even though --filesystem=host
. Tailscaled runs in /var/run/tailscale
which is why tsrelay LocalClient can't find the unix socket
marwan-at-work commented
Update:
- If we run
flatpak override --user --filesystem=/var/run/tailscale <vscode>
, flatpak ends up unable to run vscode in the first place due to this error: flatpak/flatpak#3477 (comment) (comment is the solution to undo it). - Given the error above, since
/var/run
is a symlink to/run
, then mounting/run/tailscale
actually made things work (along with the above suggested changes to run flatpak-spawn).