mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3020] Cannot run Icecat installed with Guix #1893
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1893
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Oct 30, 2019).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3020
Hello! I'm having trouble running GNUzilla Icecat installed with GNU Guix, a package manager that may be used on any GNU distribution in addition to the native one. It stores its packages in the
/gnudirectory, automatically generating symlinks to them in~/.guix-profile/bin, which is then added to the path. My path currently contains these:My operating system is Parabola GNU+Linux-libre and Firejail has been working fine with it. I have only installed Icecat and TeXmacs with Guix; TeXmacs appears to run perfectly fine with firejail, but doesn't have a pre-made profile in Firejail (which therefore falls back to the default profile), whereas Icecat currently does.
Running
firejail icecatgives me the message:Error: cannot find the program in the path. When I specify the full path to the binary with~/.guix-profile/bin/icecat, I get the message:Error: no suitable /home/username/.guix-profile/bin/icecat executable found.I thought to try whitelisting
/gnufor Icecat, so I addedwhitelist /gnuto its local profile, but with that, Firejail only tells me:Error: invalid whitelist path /gnu.If whitelisting
/gnumight help, how should I do it? If it's unlikely to work, how else could I get Icecat to run in Firejail? Please let me know if any further details on my setup or directory tree might help. Thank you!@ghost commented on GitHub (Oct 30, 2019):
Have you tried starting icecat using its full path instead of the symlinks this guix provides? I'm not familiar with guix but I assume it would be somewhere under the /gnu directory you mentioned. Hopefully that's enough to get it going. Otherwise you might need to add the below to your icecat.local to ensure the guix stuff in your $HOME is known to firejail:
@ghost commented on GitHub (Oct 30, 2019):
Thank you, @glitsj16! Starting Icecat via the full path actually gets it running, and the sandbox seems to work, too. It'd be convenient for the symlink to work, since it changes on every update and the launcher points to it by default, but I reckon I can get my system to update all of that automatically.
Unfortunately, the fonts in Icecat appear to be broken or missing, as the window only shows tofu. The console output complains about files not being found in
/gnu/store/[…]/lib/icecat. I suspect Icecat might need access to the directory, but am not sure how to grant it. Is that possible at all?(I'll check with the Guix community whether access to sub-directories of
/gnuis necessary, but it would seem that way.)@rusty-snake commented on GitHub (Oct 30, 2019):
IDK why, but FJ ignores $PATH entrys in $HOME.
Icecat has a whitelisting profile, therefore you must also whitelist this file/dir.
whitelisting is not supported in /gnu. (see the manpage for supported paths)
Where is my first post? I have already commented this? 😕
Start with
firejail --name=icecat --ignore=private-bin icecatand the join withfirejail --join=icecat bash. Then you can show how /gnu looks in the sandbox (ls /gnu).@ghost commented on GitHub (Oct 30, 2019):
I think you can do this by adding this to your icecat.local, cfr. my earlier post:
The only hurdle at the moment for that to work is trying to figure out how we can grant access to the /gnu directory. That's what @rusty-snake is trying to gather more info on. We'll get there, always fun to stumble onto new stuff like guix.
@ghost commented on GitHub (Nov 3, 2019):
Reply to @rusty-snake:
I have added the line
whitelist ${HOME}/.guix-profile/bin/icecat, which resulted in the message:Error: invalid whitelist path /home/username/.guix-profile/bin/icecat. The problem may be that the~/.guix.profiledirectory is another symlink (see below).Interesting enough, it lists the same files it does when I run the command normally, so maybe the issue is not Icecat being unable to access the directory? :/ I guess I'll ask if anyone knows how that might be intended to work in Guix…
Follow-up reply to @glitsj16:
So it turns out that all paths lead to
/gnu. The directory/home/username/.guix-profileis a symlink to/var/guix/profiles/per-user/username/guix-profile, which in turn is a (likely dynamically changing) symlink toguix-profile-17-linkin the same directory, which itself is a symlink to the appropriate profile in/gnu/store. That profile contains abindirectory with further symlinks to the individual packages, also installed in/gnu/store.@rusty-snake commented on GitHub (Nov 3, 2019):
icecat.profileincludesfirefox-common.profilewhichincludeswhitelist-var-common.inc. So your issue is there.11418a46c1/etc/firefox-common.profile (L30)Try adding
whitelist /var/guix.@rusty-snake commented on GitHub (Dec 14, 2019):
@F3nd0
I'm closing here due to inactivity, please fell free to reopen if you still have this issue.
@ghost commented on GitHub (Dec 31, 2019):
@rusty-snake
Unfortunately I do still have the issue, and didn't get much insight into the problem from the Guix community. None of the solutions suggested here have worked for me, either. I could reopen the issue, but I'm out of ideas. :/
@smitsohu commented on GitHub (Dec 31, 2019):
@F3nd0 I guess the
mkdir ${HOME}/.guix-profileprevents creating the symbolic link, can you try again without? It is possible you also need to setfollow-symlink-as-usertonoin /etc/firejail/firejail.config.Assuming there is not another symlink in ~/.config/guix/current/bin, we currently are at
@smitsohu commented on GitHub (Dec 31, 2019):
Scratch that part, it is nonsense
@ghost commented on GitHub (Jan 2, 2020):
@smitsohu Thank you, setting
follow-symlink-as-usertonodid the trick! With that, the only line I need in myicecat.localfor Icecat to work is:whitelist ${HOME}/.guix-profile. I'll see later if that works for other Guix-origin software, too.Thank you all for your persistent help; closing!