mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #5273] kate: program will not truly exit (AppImage) (dbus) #2943
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#2943
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 @Lonniebiz on GitHub (Jul 25, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/5273
Debian 11
Firejail 0.9.70
profile: https://github.com/netblue30/firejail/blob/master/etc/profile-a-l/kate.profile
I downloaded an AppImage of Kate from here:
https://binary-factory.kde.org/job/Kate_Release_appimage-centos7/
I launch this application using the following command:
firejail --appimage --profile=/etc/firejail/kate.profile ~/AppImages/kate-22.04.3-574-linux-64-gcc.AppImageThe issue I'm having, is that when I exit Kate, using Kate's own GUI, the process doesn't really exit until I press down
ctrl-cat the command line from where I launched the command above.Typically, when you exit a program you've launched from the terminal using firejail, as soon as you exit (via the GUI), the terminal goes back to a
readycommand prompt, but with Kate, it leaves the program running indefinitely after attempting to exit via its GUI.Kate has a lot of features that I'd like to have in a text editor, but I'm against its activity tracker that cannot be formally turned off, and you can't install Kate without that activity tracker as a required dependency. I thought maybe I could circumvent these undesired aspects of Kate by running an AppImage of Kate via Firejail, but even after this it seems that Kate is still trying to do something it shouldn't upon exiting. I wish I could find a fork of Kate that removes all unnecessary KDE dependencies.
However, could this issue I'm having (with properly exiting) be due to something in the firejail profile I'm using above? I'd appreciate any advice.
@smitsohu commented on GitHub (Jul 25, 2022):
Can you try adding
deterministic-shutdownto your sandbox options?Also, if you open a second terminal and run
firejail --treeit should show you which processes prevent the sandbox from shutting down.@Lonniebiz commented on GitHub (Jul 25, 2022):
@smitsohu : After adding
deterministic-shutdownto the very end of the profile (and saving), I launched the AppImage again (using the newly saved profile) like this:firejail --appimage --profile=/etc/firejail/kate.profile ~/AppImages/kate-22.04.3-574-linux-64-gcc.AppImageThis is the output while running Kate:
Upon exiting Kate (via Kate's GUI: "File" menu > "Quit"), the process was still running (indicated by firejail not returning to a
readycommand prompt yet). Exiting Kate via the GUI produce no output at the command line. So, I launched another terminal and enteredfirejail --tree, and that produced the following output:After waiting 5 minutes, the terminal (where I launched the process initially) provided no additional output and it still had not returned to a
readyprompt. So, finally, I pressedctrl+c, and over the next 10 seconds, this is the output that happened prior to ultimately reaching areadycommand prompt:The exact AppImage I'm using can be downloaded here.
@smitsohu commented on GitHub (Jul 26, 2022):
I downloaded the AppImage, and I get the same result, but also without Firejail.
So it seems this is a bug (or a feature) in Kate or in the AppImage packaging.
@kmk3 commented on GitHub (Jul 26, 2022):
@Lonniebiz commented on Jul 25:
Sounds like a bug to me. Please consider reporting it to KDE (and linking to
the report in here). This seems to be the official project page for
kactivitymanagerd:
On Arch/Artix, Kate by itself can be installed without kactivitymanagerd, which
is only listed as a hard dependency on the plasma-workspace meta-package
(though not on the plasma-desktop meta-package):
Though removing plasma-workspace on an Artix KDE install would also remove core
DE packages, such as plasma-nm, plasma-pa, powerdevil and even systemsettings,
all of which depend directly on plasma-workspace.
Anyway, if it is indeed Kate itself that has a hard dependency on
kactivitymanagerd, please consider reporting that as a packaging issue to
Debian.
@Lonniebiz commented on Jul 25:
Does
private-cacheprevent the error?It mounts a tmpfs directory onto ~/.cache, which should prevent junk from being
written to the real user home at least on that directory.
@smitsohu commented on GitHub (Jul 26, 2022):
Ah, with activity tracker you mean
kactivitymanagerd! Sorry for the misunderstanding.If I'm not mistaken you can prevent talk to kactivitymangerd by blocking D-Bus.
Simply do
firejail --dbus-user=none kate@Lonniebiz commented on GitHub (Jul 28, 2022):
@kmk3 Thanks for all the advise. Adding
private-cacheto the profile didn't prevent the issue of Kate not properly exiting. While running Kate with that option, the command line outputted:After pressing
ctrl+c, to force closing Kate, this output took about 10 seconds to finish:The exact AppImage I'm using can be downloaded here.
@Lonniebiz commented on GitHub (Jul 28, 2022):
@smitsohu Thanks! Launching with
--dbus-user=noneseems to have fixed the issue of Kate not being able to exit using the GUI:Upon exiting, using Kate's GUI, the terminal immediately reached a ready prompt:
@smitsohu commented on GitHub (Jul 28, 2022):
Glad you have solution!
Should we close here?
@kmk3 commented on GitHub (Aug 6, 2022):
@Lonniebiz commented on Jul 28:
Glad that a workaround was found.
Re-closing as "not planned" since nothing was changed in firejail.
By the way, hanging indefinitely due to lack of access to dbus seems like a bug
to me, so please consider reporting it to Kate:
Fixing the issue there would obviate the need to work around it for everyone
affected.