[GH-ISSUE #6601] kwrite: saving files causes KService to act up, resetting default apps and more #3307

Open
opened 2026-05-05 09:54:13 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @crylune on GitHub (Jan 7, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6601

Description

Saving a file as .txt in sandboxed Kwrite causes KService to crash, which in turn resets default applications and some applications such as Konsole and Strawberry disappearing (their .desktop file specifically), producing a "Plasma Workspace - Unknown application folder" error when launching them from the panel.

Steps to Reproduce

  1. Have Firejail sandbox Kwrite (should be default in firecfg.config).
  2. Enter Kwrite, write whatever, and make sure to save it as a .txt file on the Desktop or Documents folder.
  3. This should now crash KService and cause default applications to be reset along with the aforementioned .desktop file malfunctions.

Expected behavior

KWrite to save the text file successfully WITHOUT causing KService to act up.

Actual behavior

KWrite does save the file, but KService acts up.

Behavior without a profile

The program works as expected and no issues with KService are produced.

Additional context

Running kbuildsycoca6 --noincremental fixes the problem confirming it is an issue with Firejail and KService.

Environment

  • Name/version/arch of the Linux kernel (uname -srm): Linux 6.12.8-lune x86_64 (I run my own kernel, but happens on default Arch one too)
  • Name/version of the Linux distribution (e.g. "Ubuntu 20.04" or "Arch Linux"): Arch Linux
  • Version of Firejail (firejail --version): 0.9.72 (from official Arch repos)
  • If you use a development version of firejail, also the commit from which it
    was compiled (git rev-parse HEAD): -

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
  • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.

Log

Output of LC_ALL=C firejail /path/to/program

lune@arch: ~ $ LC_ALL=C firejail /usr/bin/kwrite
Reading profile /etc/firejail/kwrite.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-exec.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-shell.inc
Reading profile /etc/firejail/disable-xdg.inc
Reading profile /etc/firejail/whitelist-run-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 30651, child pid 30652
1 program installed in 1.06 ms
Warning: skipping alternatives for private /etc
Warning: skipping kde4rc for private /etc
Warning: skipping kde5rc for private /etc
Warning: skipping ld.so.preload for private /etc
Private /etc installed in 6.34 ms
Private /usr/etc installed in 0.00 ms
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Warning: not remounting /run/user/1000/doc
Warning: not remounting /run/user/1000/gvfs
Warning: cleaning all supplementary groups
Child process initialized in 74.25 ms
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
libkate.time: All plugins loaded in 0 ms
libkate.time: Created KateMainWindow in 26 ms
kf.config.core: Created a KConfigGroup on an inaccessible config location "baloofilerc" "Basic Settings"
UdevQt: unable to create udev monitor connection
kf.config.core: Created a KConfigGroup on an inaccessible config location "dolphinrc" "PreviewSettings"
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.
kf.config.core: Couldn't create a new file: "/home/lune/.config/kdeglobals" . Error: "Existing file /home/lune/.config/kdeglobals is not writable"

Parent is shutting down, bye...

Output of LC_ALL=C firejail --debug /path/to/program

https://gist.github.com/crylune/4f5192719a122762feaadea9f4997fd5

Originally created by @crylune on GitHub (Jan 7, 2025). Original GitHub issue: https://github.com/netblue30/firejail/issues/6601 <!-- See the following links for help with formatting: https://guides.github.com/features/mastering-markdown/ https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax --> ### Description Saving a file as .txt in sandboxed Kwrite causes KService to crash, which in turn resets default applications and some applications such as Konsole and Strawberry disappearing (their .desktop file specifically), producing a "Plasma Workspace - Unknown application folder" error when launching them from the panel. ### Steps to Reproduce 1. Have Firejail sandbox Kwrite (should be default in firecfg.config). 2. Enter Kwrite, write whatever, and make sure to save it as a .txt file on the Desktop or Documents folder. 3. This should now crash KService and cause default applications to be reset along with the aforementioned .desktop file malfunctions. ### Expected behavior KWrite to save the text file successfully WITHOUT causing KService to act up. ### Actual behavior KWrite does save the file, but KService acts up. ### Behavior without a profile The program works as expected and no issues with KService are produced. ### Additional context Running `kbuildsycoca6 --noincremental` fixes the problem confirming it is an issue with Firejail and KService. ### Environment - Name/version/arch of the Linux kernel (`uname -srm`): Linux 6.12.8-lune x86_64 (I run my own kernel, but happens on default Arch one too) - Name/version of the Linux distribution (e.g. "Ubuntu 20.04" or "Arch Linux"): Arch Linux - Version of Firejail (`firejail --version`): 0.9.72 (from official Arch repos) - If you use a development version of firejail, also the commit from which it was compiled (`git rev-parse HEAD`): - ### Checklist <!-- Note: Items are checked with an "x", like so: - [x] This is a checked item. --> - [x] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it). - [x] I can reproduce the issue without custom modifications (e.g. globals.local). - [x] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [x] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc). - [x] I have performed a short search for similar issues (to avoid opening a duplicate). - [x] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers. ### Log <details> <summary>Output of <code>LC_ALL=C firejail /path/to/program</code></summary> <p> ``` lune@arch: ~ $ LC_ALL=C firejail /usr/bin/kwrite Reading profile /etc/firejail/kwrite.profile Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-exec.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-shell.inc Reading profile /etc/firejail/disable-xdg.inc Reading profile /etc/firejail/whitelist-run-common.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 30651, child pid 30652 1 program installed in 1.06 ms Warning: skipping alternatives for private /etc Warning: skipping kde4rc for private /etc Warning: skipping kde5rc for private /etc Warning: skipping ld.so.preload for private /etc Private /etc installed in 6.34 ms Private /usr/etc installed in 0.00 ms Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Warning: not remounting /run/user/1000/doc Warning: not remounting /run/user/1000/gvfs Warning: cleaning all supplementary groups Child process initialized in 74.25 ms Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. libkate.time: All plugins loaded in 0 ms libkate.time: Created KateMainWindow in 26 ms kf.config.core: Created a KConfigGroup on an inaccessible config location "baloofilerc" "Basic Settings" UdevQt: unable to create udev monitor connection kf.config.core: Created a KConfigGroup on an inaccessible config location "dolphinrc" "PreviewSettings" Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it. kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it. kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it. kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it. kf.config.core: Couldn't create a new file: "/home/lune/.config/kdeglobals" . Error: "Existing file /home/lune/.config/kdeglobals is not writable" Parent is shutting down, bye... ``` </p> </details> <details> <summary>Output of <code>LC_ALL=C firejail --debug /path/to/program</code></summary> <p> <!-- If the output is too long to embed it into the comment, create a secret gist at https://gist.github.com/ and link it here. --> https://gist.github.com/crylune/4f5192719a122762feaadea9f4997fd5 </p> </details>
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#3307
No description provided.