feat: Implement Background portal for Flatpak apps#245
feat: Implement Background portal for Flatpak apps#245ZeusCraft10 wants to merge 1 commit intopop-os:masterfrom
Conversation
Implements org.freedesktop.impl.portal.Background D-Bus interface to allow Flatpak applications to request background execution permissions. This resolves the 'Access Denied' error in apps like EasyEffects when attempting to enable background/autostart functionality. Changes: - Added src/background.rs with RequestBackground and SetStatus methods - Registered Background interface in subscription.rs - Added message handling in app.rs - Updated cosmic.portal with Background interface - Added i18n strings for permission dialog Note: AutoStart returns false as full autostart support requires managing .desktop files, which can be added in a follow-up PR. Fixes: pop-os/cosmic-epoch#2854
jacobgkau
left a comment
There was a problem hiding this comment.
After installing a70d8db and rebooting, I still get the same error message when attempting to enable the Autostart on login option in Easy Effects:
@ZeusCraft10 Does this work in your environment? Is there any other information I should know for testing?
|
Isn't this the same as #70?
"AutoStart is not yet implemented" |
I see that that was stated in this PR's description. The PR description also stated under "testing" that an allow/deny dialog should be shown, which I'm not seeing. It sounds like #70 may have actually implemented autostart, but that PR's got some conflicts that would need to be resolved now. |
|
Hey @jacobgkau, thanks for giving this a spin! You're totally right - the dialog doesn't show because Easy Effects is hitting the autostart path, which I left stubbed out (returns false always, as I mentioned in the description). @therealmate good catch on #70! I honestly didn't realize that PR existed - looks like joshuamegnauth54 already did the heavy lifting there, including the actual desktop file stuff that Easy Effects needs. Going to close this one since #70 is way further along. Happy to help test or fix conflicts there if y'all need an extra pair of hands. My bad for the duplicate work! |

Description
Implements the Background portal (
org.freedesktop.impl.portal.Background) for COSMIC.This allows Flatpak applications to request permission to run in the background, resolving the "Access Denied" error in apps like EasyEffects.
Fixes pop-os/cosmic-epoch#2854
Changes
src/background.rs- New file implementing the Background D-Bus interfacesrc/main.rs- Added module declarationsrc/subscription.rs- Registered interface and added event handlingsrc/app.rs- Added message handling and dialog viewdata/cosmic.portal- Added Background interface to supported interfacesi18n/en/xdg_desktop_portal_cosmic.ftl- Added dialog stringsImplemented Methods
RequestBackground- Shows permission dialog, returns whether background is allowedSetStatus- Logs status message (placeholder for future UI integration)versionproperty - Returns version 2Limitations
autostart: false)Testing