mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5414] ktorrent: Cannot start application: No such file or directory #2987
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#2987
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 @vendion on GitHub (Oct 11, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5414
Description
Ktorrent 22.08.1 doesn't launch with the default firejail profile, instead a fatal python error is thrown.
Steps to Reproduce
Steps to reproduce the behavior
LC_ALL=C firejail /usr/bin/ktorrent(gave full path as I have firejail setup so apps are ran under it by default)Expected behavior
Ktorrent to open up.
Actual behavior
Ktorrent errored out before even opening the main window.
Behavior without a profile
Without a profile Ktorrent opens up just fine.
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
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/programhttps://gist.github.com/vendion/894010a10ebc4b2d00a9834ae41c9873
@ghost commented on GitHub (Oct 11, 2022):
Python is blocked by
include disable-interpreters.inc. Can you test if ktorrent works as expected when adding the below to a ~/.config/firejail/ktorrent.local:We can add it to our default ktorrent.profile if this fixes it for you. Or you can create a PR if you want.
@vendion commented on GitHub (Oct 11, 2022):
Seems that is not all getting blocked:
@ghost commented on GitHub (Oct 11, 2022):
Sadly I'm not really familiar with KDE to explain all these warnings, although IMO most of them look harmless. The ktorrent profile uses
nosoundso any warnings regarding pulseaudio and pipewire or to be expected. Why /home/vendion/.kde/share/config/ktorrentrc cannot be created escapes me. I guess you'll have to do more digging to pin-point what's keeping ktorrent from starting up. I'm stabbing in the dark here, but one thing that can be checked very quickly is if here have been changes that need something else in private-bin besides python*. Try withignore private-binto rule that out if you find the time to debug this further.@rusty-snake commented on GitHub (Oct 11, 2022):
Also check your syslog for seccomp messages.
@kmk3 commented on GitHub (Oct 11, 2022):
@vendion commented on Oct 11:
This should be fixed by #5415.
Does it still fail with the changes from #5415?
@X6B commented on GitHub (Oct 12, 2022):
I can launch Ktorrent using the default profile on Archlinux without problems.
The real problem with Ktorrent profile is already reported: #1793
So, if you open Ktorrent for the first time, will not save any configurations because firejail can´t write on /.config/ktorrentrc. You have to launch Ktorrent outside firejail, configure the program to your liking, let Ktorrent create a valid /.config/ktorrentrc file and using ktorrent firejailed.
In the default ktorrent profile I see strange things, for example:
private-bin kbuildsycoca4,kdeinit4 <---- KDE4 programs
.kde/ and .kde4/ folders only exist in my system because firejail (kaffeine) creates them, no program actually uses them.
@vendion commented on GitHub (Oct 14, 2022):
@X6B Odd because I do have Ktorrent already configured, and it works outside of firejail but with firejail nothing. One question, are you actively running KDE? I'm trying to launch Ktorrent from HerbstluftWM instead of KDE. Again it works without firejail this way though.
@kmk3 That at least takes care of that issue, but I'm still having the same problem.
After implementing the other suggestions in the thread here is an updated output of
firejail --debug /usr/bin/ktorrent: https://gist.github.com/vendion/99fb198013bdc3ef8704290ef45bd006@rusty-snake The only log I see seccomp in other than the debug output of firejail is AppArmor's audit log but I don't see anything for ktorrent.
@rusty-snake commented on GitHub (Oct 14, 2022):
--seccomp-error-action=log.shell noneshould be set.--noprofileworks, comment ktorrent.profile line by line to find the cause.deterministic-shutdown?@vendion commented on GitHub (Oct 14, 2022):
I don't follow what you mean here? Should I add
shell noneto the ktorrent.profile?Edit: I see now,
shell=nonepassed in as a command line argument didn't seem to have any effect. I also don't see any thing different in my logs running withseccomp-error-action=logbut I did update the above gist with the new output.Still to test is without the
deterministic-shutdownand then going line by line.@rusty-snake commented on GitHub (Oct 14, 2022):
I should not write the first part of the sentence, look up something and then write the rest without re-reading the first part ...
It should contain
shell none, https://github.com/netblue30/firejail/blob/0.9.70/etc/profile-a-l/ktorrent.profile.@X6B commented on GitHub (Oct 15, 2022):
@vendion Yes, I'm an Archlinux KDE user and never had a problem starting Ktorrent under firejail. The only problem is that the configuration files seem to be opened in read-only mode.
@vendion commented on GitHub (Oct 25, 2022):
Okay, I manage to get Ktorrent to launch under firejail with the following profile:
/etc/firejail/ktorrent.profile
.config/firejail/ktorrent.local
@rusty-snake commented on GitHub (Oct 25, 2022):
Ignoring the .local, the changes are:
@smitsohu commented on GitHub (Dec 28, 2022):
Maybe it's about time to get rid of all that kde4 cruft altogether.
From all big distributions it looks like only RHEL 7 still supports KDE/Plasma 4, and will do so till mid 2024. As far as I understand there are no free RHEL 7 clones any more, now that CentOS has been discontinued.
It would help also in other ways. Profiles like that for Okular don't have a
net none, because back in the days the D-Bus session bus socket used to be abstract, and it is close to impossible to remove D-Bus access from a KDE 4 app.Nowadays all of that is not true anymore.
@kmk3 commented on GitHub (Dec 28, 2022):
@smitsohu on Dec 28:
Sounds like a good idea to me.
(Though I'd postpone doing such a refactoring until after 0.9.72)
Could you open an issue to track/discuss this?
@smitsohu commented on GitHub (Dec 29, 2022):
Yes, will do that.
I was wrong by the way. CentOS 7 and RHEL 7 reach EOL at the same time.