| Summary: | KWin::ScreenShotDBusInterface2::checkPermissions() always false on FreeBSD X11 | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | dsh |
| Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nate |
| Priority: | NOR | ||
| Version First Reported In: | 6.3.0 | ||
| Target Milestone: | --- | ||
| Platform: | FreeBSD Ports | ||
| OS: | FreeBSD | ||
| URL: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280638 | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/2618d2cbc54505f075f57e78189423993509a9be | Version Fixed/Implemented In: | 6.3.1 |
| Sentry Crash Report: | |||
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7181 Git commit 1e7421d6b0e7ac03d1cac8323c5436a867dfc3db by Vlad Zahorodnii. Committed on 18/02/2025 at 11:36. Pushed by vladz into branch 'master'. utils: Fix permission checks on FreeBSD /proc is linux specific. M +5 -1 src/utils/serviceutils.h https://invent.kde.org/plasma/kwin/-/commit/1e7421d6b0e7ac03d1cac8323c5436a867dfc3db Git commit c2f60491aa96222b0e8599901eb0a8ce3fcc65a9 by Vlad Zahorodnii. Committed on 18/02/2025 at 11:40. Pushed by vladz into branch 'master'. utils: Export executablePathFromPid() M +3 -1 src/utils/executable_path.h https://invent.kde.org/plasma/kwin/-/commit/c2f60491aa96222b0e8599901eb0a8ce3fcc65a9 Git commit 2618d2cbc54505f075f57e78189423993509a9be by Vlad Zahorodnii. Committed on 18/02/2025 at 11:59. Pushed by vladz into branch 'Plasma/6.3'. utils: Fix permission checks on FreeBSD /proc is linux specific. (cherry picked from commit 1e7421d6b0e7ac03d1cac8323c5436a867dfc3db) M +5 -1 src/utils/serviceutils.h https://invent.kde.org/plasma/kwin/-/commit/2618d2cbc54505f075f57e78189423993509a9be Git commit 6125cfccf9123cf47e556ee0050be064ccbfaa97 by Vlad Zahorodnii. Committed on 18/02/2025 at 11:59. Pushed by vladz into branch 'Plasma/6.3'. utils: Export executablePathFromPid() (cherry picked from commit c2f60491aa96222b0e8599901eb0a8ce3fcc65a9) M +3 -1 src/utils/executable_path.h https://invent.kde.org/plasma/kwin/-/commit/6125cfccf9123cf47e556ee0050be064ccbfaa97 Thanks! I test it and it works fine. |
SUMMARY KWin::ScreenShotDBusInterface2::checkPermissions() always false on FreeBSD X11, because KWin::fetchRestrictedDBusInterfacesFromPid(pid) uses linux specific code, which reads from /proc FS static inline QStringList fetchRestrictedDBusInterfacesFromPid(const uint pid) { const auto executablePath = QFileInfo(QStringLiteral("/proc/%1/exe").arg(pid)).symLinkTarget(); return fetchProcessServiceField(executablePath, s_dbusRestrictedInterfaceName); } instead of reusing of portable executablePathFromPid(pid_t) from src/utils/executable_path.h STEPS TO REPRODUCE 1. Launch spectacle OBSERVED RESULT It shows An error occurred while taking a screenshot. KWin screenshot request failed: The process is not authorized to take a screenshot Potentially relevant information: - Method: CaptureScreen - Method specific arguments: "DP-0" EXPECTED RESULT No errors. SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: 6.3.0 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2 ADDITIONAL INFORMATION