[GH-ISSUE #927] have systemd apply firejail #628

Closed
opened 2026-05-05 06:18:41 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @valoq on GitHub (Nov 19, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/927

Is there a way to have systemd apply firejail
On gnome many applications are started by systemd and firejail has no effect even with symbolic links in PATH. I could not get any application automatically started with firejail.
It would be awesome to have a way to tell systemd to start apps with firejail.

Originally created by @valoq on GitHub (Nov 19, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/927 Is there a way to have systemd apply firejail On gnome many applications are started by systemd and firejail has no effect even with symbolic links in PATH. I could not get any application automatically started with firejail. It would be awesome to have a way to tell systemd to start apps with firejail.
gitea-mirror 2026-05-05 06:18:41 -06:00
Author
Owner

@curiosity-seeker commented on GitHub (Nov 20, 2016):

This is actually easy to do. See https://wiki.archlinux.org/index.php/Systemd#Editing_provided_units

Basically, you have to create a new unit file or a drop-in snippet in /etc/systemd/system and change the ExecStart= line to something like:

ExecStart=

ExecStart=/usr/bin/firejail /usr/sbin/dnsmasq -k --all-servers --user=nobody

The first command is necessary to nullify the original command.

This is what I've been doing for dnsmasq and dnscrypt-proxy for some time on Arch and Fedora. Works well.

<!-- gh-comment-id:261771405 --> @curiosity-seeker commented on GitHub (Nov 20, 2016): This is actually easy to do. See https://wiki.archlinux.org/index.php/Systemd#Editing_provided_units Basically, you have to create a new unit file or a drop-in snippet in /etc/systemd/system and change the ExecStart= line to something like: ``` ExecStart= ExecStart=/usr/bin/firejail /usr/sbin/dnsmasq -k --all-servers --user=nobody ``` The first command is necessary to nullify the original command. This is what I've been doing for dnsmasq and dnscrypt-proxy for some time on Arch and Fedora. Works well.
Author
Owner

@valoq commented on GitHub (Nov 20, 2016):

Thanks for the info.

It would be nice to find a way to have firejail do that automatically if possible

<!-- gh-comment-id:261773922 --> @valoq commented on GitHub (Nov 20, 2016): Thanks for the info. It would be nice to find a way to have firejail do that automatically if possible
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#628
No description provided.