[GH-ISSUE #2226] Execute firecfg on every change? #1496

Closed
opened 2026-05-05 08:09:47 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @francoism90 on GitHub (Oct 29, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2226

To use Firejail as default, one can use # firecfg to create symlinks and fix *.desktop files.

Would it be useful to have a package manager hook and/or systemd service to allow checking and recreating this on every boot?

# firejail@.service -> firejail@archie.service
[Unit]
Description=Creates symbolic links for Firejail

[Service]
Type=oneshot
ExecStart=/usr/bin/firecfg
ProtectSystem=strict
ReadWritePaths=/etc/firejail
ReadWritePaths=/usr/local/bin
ReadWritePaths=/home/%i/.local/share/applications
Environment=SUDO_USER=%i
Environment=HOME=/home/%i

[Install]
WantedBy=multi-user.target

Is this concerned as a bad practice?

Thanks.

Originally created by @francoism90 on GitHub (Oct 29, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2226 To use Firejail as default, one can use `# firecfg` to create symlinks and fix `*.desktop` files. Would it be useful to have a package manager hook and/or systemd service to allow checking and recreating this on every boot? ``` # firejail@.service -> firejail@archie.service [Unit] Description=Creates symbolic links for Firejail [Service] Type=oneshot ExecStart=/usr/bin/firecfg ProtectSystem=strict ReadWritePaths=/etc/firejail ReadWritePaths=/usr/local/bin ReadWritePaths=/home/%i/.local/share/applications Environment=SUDO_USER=%i Environment=HOME=/home/%i [Install] WantedBy=multi-user.target ``` Is this concerned as a bad practice? Thanks.
gitea-mirror 2026-05-05 08:09:48 -06:00
Author
Owner

@SkewedZeppelin commented on GitHub (Oct 29, 2018):

But why?

<!-- gh-comment-id:434053467 --> @SkewedZeppelin commented on GitHub (Oct 29, 2018): But why?
Author
Owner

@francoism90 commented on GitHub (Oct 29, 2018):

@SkewedZeppelin When installing new and/or removing applications, entries are getting out-of-dated or not symlinked at all.

<!-- gh-comment-id:434056683 --> @francoism90 commented on GitHub (Oct 29, 2018): @SkewedZeppelin When installing new and/or removing applications, entries are getting out-of-dated or not symlinked at all.
Author
Owner

@reinerh commented on GitHub (Oct 30, 2018):

For Debian-based systems you could install a trigger in /etc/apt/apt.conf.d/ that will run firecfg each time after you install something with apt (something like Dpkg::Post-Invoke {"firecfg";} (untested)).
https://wiki.debian.org/AptConf

<!-- gh-comment-id:434249669 --> @reinerh commented on GitHub (Oct 30, 2018): For Debian-based systems you could install a trigger in /etc/apt/apt.conf.d/ that will run firecfg each time after you install something with apt (something like `Dpkg::Post-Invoke {"firecfg";}` (untested)). https://wiki.debian.org/AptConf
Author
Owner

@francoism90 commented on GitHub (Oct 30, 2018):

@reinerh That's actually a better idea! On Arch Linux pacman hooks are available and can do the same thing. :)

<!-- gh-comment-id:434417883 --> @francoism90 commented on GitHub (Oct 30, 2018): @reinerh That's actually a better idea! On Arch Linux pacman hooks are available and can do the same thing. :)
Author
Owner

@SkewedZeppelin commented on GitHub (Oct 31, 2018):

@francoism90 feel free to make a PR adding the systemd unit file and the pacman alpm hook to the contrib directory

<!-- gh-comment-id:434846689 --> @SkewedZeppelin commented on GitHub (Oct 31, 2018): @francoism90 feel free to make a PR adding the systemd unit file and the pacman alpm hook to the contrib directory
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#1496
No description provided.