-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No such file or directory" on musl libc Linux distributions when escaping the Flatpak sandbox #3
Comments
Just found this note on the Zed website which could explain this. |
Another thing to consider regarding the sandbox from @someone13574's comment:
Let us know if staying within the sandbox works for you |
That worked, thanks @ShobuPrime . Though as expected, the things listed in the comment simply don't work -- e.g. the terminal, which seems to be some sort of a Flatpak $ flatpak override dev.zed.Zed --env=ZED_FLATPAK_NO_ESCAPE=true --user
$ flatpak run dev.zed.Zed
|
I was having the same issue and passing doing an |
I also had this issue in NixOS, but your method solved my problem.
|
Come to think of it, wouldn't it be possible to specifically re-include the I tried the following without success, but that could be just my lack of understanding of how flatpak override --user dev.zed.Zed --env=LD_LIBRARY_PATH="/var/lib/flatpak/runtime/org.freedesktop.Sdk/x86_64/23.08/be4a045f86be2b8a7a592bab299c7dd41c174eba94ab804
8401b1fa01c9eb86a/files/lib/x86_64-linux-gnu/" |
Oh, nevermind, the $ flatpak run --verbose dev.zed.Zed
[redacted]
F: Running 'bwrap --args 37 -- zed'
Portal call failed: Failed to start command: Failed to execute child process “/var/lib/flatpak/app/dev.zed.Zed/x86_64/stable/dc4752dc5761f9d27856381519f381170580c99c6bc020aad980cea8efe18378/files/bin/zed” (No such file or directory) It seems that the issue is not with the bundled libs. |
So I think the current best approach if you want (or need) to use Zed without the sandbox escape is to enable the {
"terminal": {
"shell": {
"with_arguments": {
"program": "flatpak-spawn",
"args": ["--host", "--env=TERM=xterm-256color", "bash"]
}
}
} This will enable the terminal to launch as if it was on the host. This was adapted from VSCode. It would be better if |
That’s what I was doing in some earlier prototypes of flatpak support, but the Zed developers were against having a third party program as a critical part. Not sure if it not being the primary method changes anything. |
Sure, but adding a sandbox escape is a worse idea tbh. |
Thought of a workaround for us musl users. The Zed remote server is statically linked and it will run on (almost) any system, so we can run Zed itself sandboxed and remote into Install and run the OpenSSH server (or Dropbear + OpenSSH SFTP) and add your SSH public key to your own An example from my Alpine machine, sans any security for the SSH server:
|
@rudolf-enum: you should refine the issue title to something more meaningful explicitly mentioning zed flatpak and musl distros support issues. |
EDIT: The original text of this issue assumes that this Flatpak of Zed doesn't escape the Flatpak sandbox, which it does, and so it's like running
zed
directly, which in this case doesn't work as Zed is dynamically linked against glibc.Hello, I'm having trouble running this on Alpine Linux -- though I assume that the choice of distro shouldn't matter too much since it's flatpak.
Zed doesn't even start,
flatpak run dev.zed.Zed
immediately fails to launch the binary.The file is there, but I can't run it directly (outside of flatpak) because Alpine has
musl
instead ofglibc
and the Linux release of Zed is dynamically linked toglibc
.There is a seemingly relevant open issue in Flatpak itself where the OS is NixOS, which tends to share with Alpine these kinds of issues.
Since I don't have issues with any other Flatpak package, could it be that the issue is with
dev.zed.Zed
? Thank you.The text was updated successfully, but these errors were encountered: