Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snap): ability to specify slot properties #5313

Merged
merged 1 commit into from Nov 28, 2020

Conversation

feugy
Copy link
Contributor

@feugy feugy commented Sep 26, 2020

What's in there?

This is required to allow snap-packaged app declaring mpris slots.

How to test?

Compile source and schema, then TEST_FILES=snapTest yarn test.

Note to reviewers

I'm currently developing a portable music player with electron named melodie.
One very basic feature is the usage of MediaMetadata, which makes the operating system aware of which track is currently playing, and gives it a change to pause, and jump to next or previous.

On linux systems, this integrations is use Media Player Remote Interface Specification (mpris): the application sends DBus commands to interact with the OS.

This works perfectly fine with all the packager I've tested, except with snap.

When running the snap in devmode or with classic confinement, Linux can interact with the player controls.
But when using strict confinement, Linux is not aware of it.
The snappy-debug tool spot the issue pretty quickly:

= AppArmor =
Time: Sep 26 20:57:04
Log: apparmor="DENIED" operation="dbus_bind"  bus="session" name="org.mpris.MediaPlayer2.chromium.instance38417" mask="bind" pid=38417 label="snap.melodie.melodie"
DBus access
Suggestion:
* use 'mpris' slot (https://github.com/snapcore/snapd/wiki/Interfaces#mpris)

After two days of try-and-fail research and web crawling it appears that:

I initially though I could hardcode the mpris name as long as someone specifies mpris in electron-builder's configuration, but then I changed to something generic: there are other slots that require parameters.

@feugy
Copy link
Contributor Author

feugy commented Oct 25, 2020

Hello there.

Is there anything I could provide to get this PR reviewed?
I'd like to release my application, and I can not until I get this fixed.

Thanks a million.

@develar develar merged commit 1235c4e into electron-userland:master Nov 28, 2020
@feugy
Copy link
Contributor Author

feugy commented Nov 28, 2020

Thanks a million Develar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Snap]: can not specify slot details
2 participants