Bug 498159 - Flatpack Star can compare directories outside home folder
Summary: Flatpack Star can compare directories outside home folder
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (other bugs)
Version First Reported In: 1.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-02 14:29 UTC by Karsten Gresch
Modified: 2025-01-04 04:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 1.12.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Gresch 2025-01-02 14:29:04 UTC
SUMMARY


STEPS TO REPRODUCE
1. Install kdiff3 from Flatpack () 
2. Run

```
flatpak run org.kde.kdiff3                                                                                                                                                                                                                                                      
```

3. Select two arbitrary local directories.

OBSERVED RESULT
I received the following error messages:

```
Qt: Session management error: Could not open network socket
kf.solid.backends.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
```
Furthermore, instead of displaying the different directory contents, kdiff3 showed in each pane the  message "Encoding: Line end style: Unkown"

EXPECTED RESULT
- No error messages.
- Different directory content displayed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.11.0-108013-tuxedo (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
N/A
Comment 1 michael 2025-01-03 15:06:16 UTC
Looks we the "Qt: Session management error" is an internal session management errot that does not impact kdiff3 functionally. 
Qt is trying to access '/tmp/.ICE-unix' which is being blocked by flatpak default configuration. See https://docs.flatpak.org/en/latest/sandbox-permissions.html for more on that. Allowing access to '/tmp' changes the error but does not remove it completely. As far as kdiff3 not being able to actually do the comparison that can be adjusted in my build config. Currently this has been set to allow the home folder via one of flatpak's fixed presets. Otherwise even that would not be allowed.

Passing '--filesystem=host' to flatpaks at launch will allow as much access to most directories. A few restricts are enforced even then hence why the Qt warning doesn't go away.  The full command would be:

flatpak run --filesystem=host org.kde.kdiff3

To set this as default  run:

flatpak override --filesystem=host org.kde.kdiff3

Next will do this at build time.
Comment 2 michael 2025-01-04 02:04:04 UTC
Git commit 89aa5c44dd4611697491b3242a69afc0f027aa01 by Michael Reeves.
Committed on 04/01/2025 at 02:02.
Pushed by mreeves into branch '1.12'.

[flatpak] Enable sound, printing and local file system access
FIXED-IN:1.12.1

M  +6    -1    .flatpak-manifest.json

https://invent.kde.org/sdk/kdiff3/-/commit/89aa5c44dd4611697491b3242a69afc0f027aa01
Comment 3 michael 2025-01-04 04:07:47 UTC
Git commit 614b5dfcaedea22e8bfda310863204b1408d1ece by Michael Reeves.
Committed on 04/01/2025 at 03:58.
Pushed by mreeves into branch 'master'.

[flatpak] Enable sound, printing and local file system access
FIXED-IN:1.12.1

M  +6    -1    .flatpak-manifest.json

https://invent.kde.org/sdk/kdiff3/-/commit/614b5dfcaedea22e8bfda310863204b1408d1ece