[GH-ISSUE #3536] Custom/local applications doesn't start #2222

Closed
opened 2026-05-05 08:54:32 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @tjerry on GitHub (Jul 22, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3536

I'm trying to start some custom applications, which are not installed in the system.
For instance, I'd like to start an app in /home/user/Apps.
But firejails exists with an error.

$ firejail --net=none --private=/var/tmp/home /home/user/Apps/pencil/pencil
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 23389, child pid 23390
Child process initialized in 34.87 ms
/bin/bash: /home/user/Apps/pencil/pencil: No such file or directory

Parent is shutting down, bye...

Does firejail work with custom/local applications, or do they have to be installed in the system?

Originally created by @tjerry on GitHub (Jul 22, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3536 I'm trying to start some custom applications, which are not installed in the system. For instance, I'd like to start an app in /home/user/Apps. But firejails exists with an error. ``` $ firejail --net=none --private=/var/tmp/home /home/user/Apps/pencil/pencil Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 23389, child pid 23390 Child process initialized in 34.87 ms /bin/bash: /home/user/Apps/pencil/pencil: No such file or directory Parent is shutting down, bye... ``` Does firejail work with custom/local applications, or do they have to be installed in the system?
gitea-mirror 2026-05-05 08:54:32 -06:00
Author
Owner

@rusty-snake commented on GitHub (Jul 22, 2020):

Does firejail work with custom/local applications

Yes.

  1. The default.profile works not with every program.
  2. You need to allow ignore noexec ${HOME} if disbale-exec.in is included.
  3. The binary must be inside a private $HOME if private is used.

The last point is important for you now.

<!-- gh-comment-id:662554679 --> @rusty-snake commented on GitHub (Jul 22, 2020): > Does firejail work with custom/local applications Yes. 1. The default.profile works not with every program. 2. You need to allow `ignore noexec ${HOME}` if disbale-exec.in is `include`d. 3. The binary must be inside a `private` $HOME if `private` is used. The last point is important for you now.
Author
Owner

@tjerry commented on GitHub (Jul 22, 2020):

OK.
So I copied an app to a private $HOME and another error came up.
I haven't been able to find anything about that error.

$ firejail --net=none --private=/var/tmp/home /var/tmp/home/edraw/EdrawMax 
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 3305, child pid 3306
Error opening private directory: fs_home.c:262 fs_private_homedir: No such file or directory
Error: proc 3305 cannot sync with peer: unexpected EOF
Peer 3306 unexpectedly exited with status 1
<!-- gh-comment-id:662650813 --> @tjerry commented on GitHub (Jul 22, 2020): OK. So I copied an app to a private $HOME and another error came up. I haven't been able to find anything about that error. ``` $ firejail --net=none --private=/var/tmp/home /var/tmp/home/edraw/EdrawMax Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 3305, child pid 3306 Error opening private directory: fs_home.c:262 fs_private_homedir: No such file or directory Error: proc 3305 cannot sync with peer: unexpected EOF Peer 3306 unexpectedly exited with status 1 ```
Author
Owner

@rusty-snake commented on GitHub (Jul 22, 2020):

I haven't been able to find anything about that error.

No such file or directory: Did you created /var/tmp/home?

You need to add keep-var-tmp likey this firejail --net=none --private=/var/tmp/home --keep-var-tmp /path/to/app.

<!-- gh-comment-id:662662351 --> @rusty-snake commented on GitHub (Jul 22, 2020): > I haven't been able to find anything about that error. ~`No such file or directory`: Did you created /var/tmp/home?~ You need to add `keep-var-tmp` likey this `firejail --net=none --private=/var/tmp/home --keep-var-tmp /path/to/app`.
Author
Owner

@tjerry commented on GitHub (Jul 22, 2020):

It looks like --keep-var-tmp did the trick.
However, edraw needs some shard libraries, that my system is missing.
So I tried other apps, like Pencil or Typora.

$ firejail --net=none --private=/var/tmp/home --keep-var-tmp /var/tmp/home/typora/Typora

Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 25499, child pid 25500
Child process initialized in 33.71 ms

Parent is shutting down, bye...

There is no error, but the application doesn't start and firejail just quits.

Is there a way to debug this?
If this helps, I'm on Gentoo and firejail was compiled with chroot file-transfer globalcfg network overlayfs private-home seccomp suid userns whitelist -apparmor -contrib -debug -test -vim-syntax -x11

<!-- gh-comment-id:662670809 --> @tjerry commented on GitHub (Jul 22, 2020): It looks like `--keep-var-tmp` did the trick. However, edraw needs some shard libraries, that my system is missing. So I tried other apps, like `Pencil` or `Typora`. ``` $ firejail --net=none --private=/var/tmp/home --keep-var-tmp /var/tmp/home/typora/Typora Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 25499, child pid 25500 Child process initialized in 33.71 ms Parent is shutting down, bye... ``` There is no error, but the application doesn't start and `firejail` just quits. Is there a way to debug this? If this helps, I'm on `Gentoo` and `firejail` was compiled with `chroot file-transfer globalcfg network overlayfs private-home seccomp suid userns whitelist -apparmor -contrib -debug -test -vim-syntax -x11`
Author
Owner

@smitsohu commented on GitHub (Jul 23, 2020):

By default, the sandbox /var is mounted read-only and noexec. You may want to disable that with --writable-var

<!-- gh-comment-id:663253969 --> @smitsohu commented on GitHub (Jul 23, 2020): By default, the sandbox /var is mounted read-only and noexec. You may want to disable that with `--writable-var`
Author
Owner

@tjerry commented on GitHub (Jul 24, 2020):

No, it's not it.
For the sake of simplicity I'll start it from my home directory.
So:

$ firejai --net=none /home/user/apps/Typora/Typora
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 27884, child pid 27885
Child process initialized in 30.20 ms

Parent is shutting down, bye...
<!-- gh-comment-id:663512671 --> @tjerry commented on GitHub (Jul 24, 2020): No, it's not it. For the sake of simplicity I'll start it from my home directory. So: ``` $ firejai --net=none /home/user/apps/Typora/Typora Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 27884, child pid 27885 Child process initialized in 30.20 ms Parent is shutting down, bye... ```
Author
Owner

@rusty-snake commented on GitHub (Jul 24, 2020):

works this?

<!-- gh-comment-id:663513642 --> @rusty-snake commented on GitHub (Jul 24, 2020): works this?
Author
Owner

@tjerry commented on GitHub (Jul 24, 2020):

works this?

$ firejai --net=none /home/user/apps/Typora/Typora
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 27884, child pid 27885
Child process initialized in 30.20 ms

Parent is shutting down, bye...

There is no error. But the Typora doesn't start. Firejail just quits.

However, the following works.
$ firejail --noprofile --net=none /home/static/Data/Software/Linux/Typora/Typora

<!-- gh-comment-id:663552781 --> @tjerry commented on GitHub (Jul 24, 2020): > works this? ``` $ firejai --net=none /home/user/apps/Typora/Typora Reading profile /etc/firejail/default.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc ** Note: you can use --noprofile to disable default.profile ** Parent pid 27884, child pid 27885 Child process initialized in 30.20 ms Parent is shutting down, bye... ``` There is no error. But the Typora doesn't start. Firejail just quits. However, the following works. `$ firejail --noprofile --net=none /home/static/Data/Software/Linux/Typora/Typora`
Author
Owner

@rusty-snake commented on GitHub (Jul 25, 2020):

Then you need to write a profile for it (or request one in #1139).

<!-- gh-comment-id:663855953 --> @rusty-snake commented on GitHub (Jul 25, 2020): Then you need to write a profile for it (or request one in #1139).
Author
Owner

@rusty-snake commented on GitHub (Sep 1, 2020):

I'm closing here due to inactivity, please fell free to request to reopen if you still have this issue.

<!-- gh-comment-id:684922689 --> @rusty-snake commented on GitHub (Sep 1, 2020): I'm closing here due to inactivity, please fell free to request to reopen if you still have this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2222
No description provided.