mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5245] Firecfg still creates desktop files despite being disabled in firecfg.config #2932
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#2932
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 @jkcdarunday on GitHub (Jul 12, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5245
Description
Because firejail breaks spectacle on KDE Plasma Wayland (https://github.com/netblue30/firejail/issues/5127), I want to disable firejail for spectacle. I did this by editing /etc/firejail/firecfg.config and commenting out spectacle. And then I deleted the /usr/local/bin/spectacle symlink and the ~/.local/share/applications/org.kde.spectacle.desktop file. However, running sudo firecfg keeps on reproducing the said desktop file (but not the symlink) and the desktop file seems to cause spectacle to break because it messes up with the KDE permissions specified in the file.
Steps to Reproduce
Expected behavior
Firecfg should not produce application desktop files in the home directory when an application is commented out in firecfg.config.
Actual behavior
Firecfg creates a desktop file (but not /usr/local/bin symlinks)
Behavior without a profile
Completely deleting the profile makes it not produce a desktop file but my package manager would simply reinstall the profile by the next update so this doesn't work well as a solution.
Additional context
Environment
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Relevant output of firecfg --debug
@nexpspace commented on GitHub (Oct 20, 2022):
Same problem for me on Gentoo Linux, firejail 0.9.30, KDE Plasma 5.26.1. I have to manually remove the desktop file every update (which automatically runs
firecfgfor me). While I would consider making spectacle work in Wayland would be an enhancement, I would consider creating desktop files for disabled applications a bug.@vendion commented on GitHub (Jan 13, 2023):
This still is happening with firejail version 0.9.72 (installed as 0.9.72rc1.r8964.ee89a263e-1 from the AUR) and KDE Plasma 5.26.5. I would also agree with above that this is more of a bug than an enhancement.
@kmk3 commented on GitHub (Jan 13, 2023):
As a workaround, do the affected applications work if creating empty profile
overrides? Example:
If not, there is also noprofile.profile, which tries to make the sandbox as
permissive as possible (for debugging purposes).
Does it work if including noprofile.profile? Example:
~/.config/firejail/spectacle.profile:
@kmk3 commented on GitHub (Jan 13, 2023):
It looks like a bug to me.
@rusty-snake Thoughts?
@kmk3 commented on GitHub (Jan 13, 2023):
Relates to:
@rusty-snake commented on GitHub (Jan 13, 2023):
I understand that this may look like a bug from a external point of view. However to me it looks more like a new feature.
sudo firecfgdoes a few independent tasks like adding the current user tofirejail.users, creating symlinks and "fixing" desktop files. The feature which creates the symlinks is documented and coded to create symlinks for all programs infirecfg.config(and~/.config/firejail/(*).profileundocumented). The "fixing" desktop files feature fixes desktop files whose name(*).desktopor*\.(*).desktophave a profile in/etc/firejailor~/.config/firejail. So two independent features have two independent sources which happen to have a huge overlap.Of course is this confusing and can be designed better. But as everything works as deigned and just the desing is bad, it is rather a enhancement for the design than a fix for the design/implementation because a fix corrects something while a enhancements does it better (or sometimes other/in a new way, the term "better" can be subjective).
@vendion commented on GitHub (Jan 15, 2023):
There is a new commit for firejail-git in the AUR so I went ahead and tried the first suggestion of creating an empty ~/.config/firejail/spectacle.profile and making sure that ~/.local/share/applications/org.kde.spectacle.desktop didn't exist before upgrading. The result I experienced was that after the upgrade was done and the symlinks gets recreated, so does ~/.local/share/applications/org.kde.spectacle.desktop.
I'll test the other work around later to see if that changes anything..
@rusty-snake commented on GitHub (Jan 15, 2023):
This should stop firecfg from doing any user related action (fixing desktop files and adding the user to firejail.users) because it can not get the user who started it:
I did not tested it because I don't use firecfg.
@vendion commented on GitHub (Jan 15, 2023):
Okay, even adding
include noprofile.profileto .config/firejail/spectacle.profile doesn't work.@rusty-snake commented on GitHub (Jan 15, 2023):
So spectacle is just incompatible with firejail. Should we remove the profile? At least for 0.9.72, it would hotfix this issue in the most common spot and since spectacle can not be sandboxed there is no lose.
@vendion commented on GitHub (Jan 15, 2023):
I can't speak for the others in this thread, but personally, stopping firecfg from managing symlinks and fixings the desktop files is not exactly what I want to do.
While I can't speak for nexpspace as he is on Gentoo, but OP and myself we might be able to write a simple pacman hook that always runs to remove $HOME/.local/share/applications/spectacle.desktop until this issue gets resolved. Although even that has its own problems as I don't know if we can set the new hook to fire after the firecfg hook...
@vendion commented on GitHub (Jan 15, 2023):
Under X11 it runs fine with firejail, the issue is when using Wayland something about the profile causes it to break (See #5127 which was already closed but no proper resolution it seems)
@vendion commented on GitHub (Jan 15, 2023):
If it could help I would be more than happy to dump out debug info, but didn't think it was needed since the ticket here originally about commenting out an application in /etc/firejail/firecfg.config doesn't prevent the fixing of desktop files step.
@rusty-snake commented on GitHub (Jan 15, 2023):
It will still create symlinks.
You mean for spectacle. Yes a separate issue is better or I can just reopen #5127 if there are users who can test stuff.
@kmk3 commented on GitHub (Jan 11, 2024):
Does spectacle get ignored when installing firejail from #6153 and adding the
following to /etc/firejail/firecfg.d/foo.conf?
If not, what about the following?