如何通过firejail运行本地应用程序?

Ric*_*ick 5 bash ubuntu firejail

我已经在本地安装了 debian 包。我随机选择了 Opera,通过 提取dkpg -x opera-x.y.z.deb ~/bin/opera_package,并在我的用户~/bin文件夹(位于用户路径中)中创建了一个符号链接。

试图在侧火监狱中奔跑

$ firejail opera

Reading profile /etc/firejail/opera.profile
Reading profile /etc/firejail/disable-mgmt.inc
Reading profile /etc/firejail/disable-secret.inc
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/whitelist-common.inc
Parent pid 14762, child pid 14763

Child process initialized
/bin/bash: opera: command not found

parent is shutting down, bye...
Run Code Online (Sandbox Code Playgroud)

如果我尝试使用绝对路径(从我的主文件夹)运行:

$ firejail /bin/local_packages/opera/usr/lib/x86_64-linux-gnu/opera/opera
Reading profile /etc/firejail/opera.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/whitelist-common.inc
Parent pid 15796, child pid 15797
Child process initialized
/bin/bash: /bin/local_packages/opera/usr/lib/x86_64-linux-gnu/opera/opera: No such file or directory

Parent is shutting down, bye...
Run Code Online (Sandbox Code Playgroud)

浏览器 GUI 永远不会启动,C​​LI 会报告进程 DOA。我假设我需要调整disable-common.inc

# grep -Rin 'bin' .
./disable-common.inc:125:# The user ~/bin directory can override commands such as ls
./disable-common.inc:126:read-only ${HOME}/bin
Run Code Online (Sandbox Code Playgroud)

我的问题:

  • 如何通过firejail运行本地应用程序?
  • 是否有本地应用程序的配置文件?
  • 我需要编辑 disable-common.profile 吗?
  • 是否有允许文件夹的 CL 选项?
  • 我只是选择一个不同的文件夹~/bin/吗?

我的目标:

我想...

  1. 编译后从 github.com 克隆的沙箱应用程序
  2. 将源代码和二进制文件保存在我的用户文件夹中
  3. 不必sudo在任何时候(安装之外firejail

L29*_*9Ah 1

Firejail 当然应该能够开箱即用地做到这一点,我自己就是这样使用的。尝试运行firejail bash并检查是否看到有问题的可执行文件。此外,opera可能是一个 shell 脚本,用于设置环境并运行另一个二进制文件,该二进制文件被firejail.