让 Flatpak 访问系统二进制文件的正确方法是什么?
我正在使用 Atom 的 flatpak 版本。我的许多扩展都需要可执行二进制文件的路径,例如用于代码完成的 php
二进制文件。
现在 Flatpak 将 /usr
目录列入黑名单,当我传递 /usr/bin/php
目录时,即使安装了二进制文件并且它是正确的,它也找不到正确的二进制文件目录添加到 flatpak 的 PATH
环境变量中。
那么正确的做法是什么呢?我还偶然发现了二进制文件本身的 Flatpak 版本作为 org.freedesktop.Sdk 包的扩展,但是如果我要使用它们,如何将它们传递给需要的 Atom 扩展可执行文件的路径?
附录:我认识到有一些解决方法,例如不使用 Flatpak Atom 并使用 deb 包,或者使用提供了所需二进制文件的不同 IDE flatpak,但我对这种特定情况的解决方案感兴趣。
I'm using the flatpak version of Atom. A lot of my extentions require paths to executable binaries such as the php
binary for code completion.
Now Flatpak blacklists the /usr
directory, do when I pass the /usr/bin/php
directory it doesn't find the proper binary even if the binary is installed and it's directory is added to the PATH
environment variable of the flatpak.
So what is the correct way to do it? I've also stumbled upon flatpak versions of the binaries themselves as extentions of the org.freedesktop.Sdk
package, but if I'm to use those, how do I pass them to an Atom extention that requires a path to an executable?
Addendum: I recognise that there are workarounds such as not using Flatpak Atom and using the deb package instead, or using a different IDE flatpak that has the required binaries provided, but I'm interested in a solution to this specific case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下答案是否定的。我看到你的问题没有得到解答,所以请尝试这个。虽然这是针对 java 的,但我希望您可以尝试 PHP...希望它对您有所帮助
但是您可以指定您想要的..
选项 1:
添加
--filesystem=host
选项,然后在/run/host
下的沙箱中访问它们。*选项 2:
使用 Java 16 (1.16+) 及更高版本,&
启用自定义 Java 路径选项
By default the answer is no.. I saw your question went unanswered, so please try this. While this is for java, my hope is that you can try PHP... hope it helps you
However you can specify which ones you want..
Option 1:
add
--filesystem=host
option and then access them in the sandbox under/run/host
.*Option 2:
With Java 16 (1.16+) and later, &
enable the custom Java path option