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?
Does firejail work with custom/local applications
Yes.
ignore noexec ${HOME} if disbale-exec.in is included.private $HOME if private is used.The last point is important for you now.
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
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.
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
By default, the sandbox /var is mounted read-only and noexec. You may want to disable that with --writable-var
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...
works this?
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
Then you need to write a profile for it (or request one in #1139).
I'm closing here due to inactivity, please fell free to request to reopen if you still have this issue.