Stmg: auto-connect requests

The stmg snap contains 6 apps, 3 games and 3 config utilities

For stmg.jointris, stmg.swapper, stmg.mynes (the games) I’d like to
request auto-connect to the following interfaces:

  • joystick
  • bluetooth-control (used to launch a server for multiple “keyboards”)
  • personal-files (load custom games and themes from ‘~/.local/share/stmm-games’)

Request interface for stmg.stmm-input-btkb
(the virtual “keyboard” client to connect to a server):

  • bluetooth-control

I’m aware that most people probably launch gui apps by clicking on the menu entries
created by the snap, but I was wondering if it would make sense to also make
auto-alias requests for just the games, too.


+1 from me for joystick.

In regards to personal-files - is this just for read or do you want write permission as well for this path?

Also as someone who is not that familiar with stmg, bluetooth-control seems a bit of an odd request - can you please describe how this is used in more detail?

Thanks for the reply!

The stmg snap is a bundle of revisited classic games that all use the same libraries based on GTK.
Since the common code is much bigger than the game specific code, I put them in the same snap alongside the utilities to configure them.

I just need it for read access to a very specific folder; to load custom or to be tested levels and themes. But it’s not very important … on my website I also provide .deb installation zips. I can readily drop this interface request if needed.

It’s needed because I use the bluetooth L2CAP socket to create a server (loaded as a plugin by the games) on one computer and to create a client on another (the stmg.stmm-input-btkb app included in the snap).
I modified the code examples in Albert Huang’s book
The L2CAP protocol is the bluetooth equivalent of UDP in TCP/IP.
The server receives data packets containing the pressed (and released) keys in the client application. This allows up to 6 players (the bluetooth limit I think) to play a game from another computer using their keyboard or, potentially, using touch from a smartphone (at some point I’ll buy a PinePhone or a Librem 5 to make sure the bluetooth client works on them, too).

Ok based on this description, the personal-files read access seems quite normal so +1 from me for personal-files, however to ensure this matches the usual naming conventions, could this please be named:

    interface: personal-files
    - $HOME/.local/share/stmm-games

For bluetooth-control I am still not sure that users installing this game would expect it to be automatically granted control over the bluetooth stack, so -1 from me for auto-connect of bluetooth-control.

Great! I am going to paste the snippet into the snapcraft.yaml.

As for bluetooth-control, do I need to remove all parts, apps and interface requirements bluetooth related
or do I leave them in the yaml so that a user could potentially still decide to connect to the interface manually?
Either way is fine with me.

FYI: Currently the source code checks (using snapctl) whether the interface is connected. If it isn’t it prints out the warning

Not allowed to use bluetooth.
Please grant permission with 'sudo snap connect stmg:bluetooth-control :bluetooth-control'.

and I could also explain how to connect to the interface manually in the snap’s description.


This seems fine to me - please leave these parts as-is in the snap so the user can optionally connect it as prompted.

+1 for auto-connection of joystick. +1 for use of and auto-connection of personal-files for read-only access to $HOME/.local/share/stmm-games with dot-local-share-stmm-games as the interface reference.

-1 for bluetooth-control for the reasons that @alexmurray mentioned. I’ll also say that it is fine to leave all the bluetooth functionality in the snap: users can always run sudo snap connect stmg:bluetooth-control (or use snap-store/gnome-software to connect the interfaces) and your snap can guide them through this process by using snapctl is_connected bluetooth-control to check to see if it is connected and appropriately prompt the user with instructions.

2 votes for, 0 against for auto-connecting joystick, 0 against. Granting

2 votes for, 0 against for use of and auto-connection of personal-files for read-only access to $HOME/.local/share/stmm-games with dot-local-share-stmm-games as the interface reference. Granting

0 votes for, 2 against for auto-connecting bluetooth-control.

This (joystick and personal-files) is now live.

FYI, there is an additional change to the review-tools for this use of personal-files that is not in production yet. Once it is, your snap will pass automated review. Until then, feel free to request manual reviews and a reviewer will manually approve.

Currently revision 3 is rejected. Feel free to either upload a new revision or rerequest a manual review for revision 3.