mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6657] firecfg: gedit is not sandboxed (.desktop file) #3328
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#3328
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 @ginto37 on GitHub (Feb 21, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6657
Description
gedit AKA TextEdit is not sandboxed with firejail if it is launched using the Search feature from the Activities/Overview mode in Ubuntu 22.04 LTS. It is sandboxed if launched from the Terminal with
gedit.Steps to Reproduce
Steps to reproduce the behavior
firejail --listExpected behavior
Output should be similar to the following:
3233:USERNAME::/usr/bin/firejail /usr/bin/geditActual behavior
There is no output.
Behavior without a profile
N/A
Additional context
gedit AKA TextEdit is sandboxed if launched from the Terminal using
gedit.Environment
uname -srm): Linux 6.8.0-52-generic x86_64mesa 1:24.3.3-2"): gedit 41.0
firejail --version): firejail version 0.9.72Compile time support:
- always force nonewprivs support is disabled
- AppArmor support is enabled
- AppImage support is enabled
- chroot support is enabled
- D-BUS proxy support is enabled
- file transfer support is enabled
- firetunnel support is disabled
- IDS support is enabled
- networking support is enabled
- output logging is enabled
- overlayfs support is disabled
- private-home support is enabled
- private-cache and tmpfs as user enabled
- SELinux support is enabled
- user namespace support is enabled
- X11 sandboxing support is enabled
was compiled (
git rev-parse HEAD):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
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/program@rusty-snake commented on GitHub (Feb 21, 2025):
Works as intended.
0c791124a0/src/firecfg/firecfg.config (L330)@kmk3 commented on GitHub (Feb 21, 2025):
Relates to:
@ginto37 commented on GitHub (Feb 25, 2025):
OK, if I'm reading this right, then there's a misunderstanding. I've uncommented
geditin/etc/firejail/firecfg.config.When I wrote:
I meant the following:
geditI think you're assuming I meant:
firejail geditAm I right?
EDIT: Meant to add that VLC behaves the same way. It isn't sandboxed with
firejailif I launch it from Activities view, but:vlcand it is.
@kmk3 commented on GitHub (Feb 27, 2025):
Same as in the following comment:
What is the output of the following:
@ginto37 commented on GitHub (Mar 1, 2025):
@kmk3 commented on GitHub (Mar 1, 2025):
Why was it removed?
It was clearly in your firecfg log:
@kmk3 commented on GitHub (Mar 1, 2025):
Does it work if you do the following?
sudo firecfgas your normal user@ginto37 commented on GitHub (Mar 5, 2025):
I've looked into this - I think I was still running as admin because of the earlier
sudo firecfgso the output was for the wrong user. Replacing the username with USERNAME stopped this from becoming clear. I'll use ADMIN_USER and STANDARD_USER from now on respectively.The output of
ls -al ~/.local/share/applications/for the standard user account shows that directory to be empty.After a reboot both TextEdit and VLC are sandboxed if launched from the Activities view of the standard user.
@ginto37 commented on GitHub (Mar 7, 2025):
It looks like you're attributing this to user error. I checked the
installation steps in the README.md and in the video on YouTube, and it
doesn't indicate in either of those that it's necessary to run
sudo firecfgfrom the user account where you'll be running the sandboxedapps. To be fair, it doesn't explicitly indicate that you run it from
the admin account either. However,
firecfg, at least for me, was /not/automatically added to my standard user's
sudoerspermissions, andthis isn't stated as a manually required step in either of the places I
mentioned above, so it's reasonable to assume that the instruction is
referring to the admin user.
If
sudo firecfgshould always be run from the user account whereyou'll be running the sandboxed apps, then either
sudo firecfgshouldbe automatically added to that user's
sudoerspermissions duringinstallation (not ideal, IMO, for the usual security reasons) or there
should be an explicit instruction to that effect in the appropriate places.
But then again, I don't see why
sudo firecfgrunning as the admin usershouldn't be able to accomplish the same things without involving the
sudoersfile.If I've misunderstood the reason for closing this issue, let me know.
@kmk3 commented on GitHub (Mar 7, 2025):
Yes.
I don't think it's very common to have a separate admin-only account (other
than root), so that's probably why it's not mentioned.
The fact that it says
sudo firecfgrather than justfirecfg(and thatfirecfgrequires privileges) is an indicator that it should be executed asa normal user rather than root (or another similar account).
Though that requirement indeed could be made more explicit, so thanks for
reporting it.
I created a PR to clarify that:
Also, as mentioned by @rusty-snake, note that it is possible to run
firecfgas root to add the global symlinks and thenfirecfg --fixas anunprivileged user just to apply the desktop integration for that user.
Note that firejail does not modify the sudoers file at all.
I don't think I'd expect any program to do so (other than the package manager),
especially since an invalid sudoers file could lead to the end user being
unable to perform privileged actions at all.
Kind of related to that, see the following in
firejail(1)(added in #5290):firecfg only modifies .desktop files for the user running it, as not all users
may be able to run firejail and the end user may not want to create .desktop
file overrides in the home directory of all user accounts.
So to enable desktop integration for multiple users, run
firecfg --fixaseach one of them.