echofiles: dbus slot and removable-media auto-connection

This category is for handling requests for privileged interfaces, formerly known as auto-connections. The process is documented in Process for aliases, auto-connections and tracks.

To make the review of your request easier, please use the following template to provide all the required details and also include any other information that may be relevant.


name: echofiles
description: Keeps the folders you choose the same on your own computers, copying files directly between them (peer to peer).
snapcraft: PRIVATE
upstream: PRIVATE
upstream-relation: developer and publisher (Ontiqo Pty Ltd)
plugs:
  removable-media:
    request-type: auto-connection
    reasoning: people often keep the folders they sync on a second or external drive (/media, /mnt). The app only
      uses folders the person picks in it and never scans drives. Without it, adding a folder on another drive fails
      until they run "snap connect echofiles:removable-media".
slots:
  dbus-app:
    interface: dbus
    attributes:
      bus: session
      name: app.echofiles.EchofilesPlus
    request-type: manual-connection
    reasoning: GTK 4 app. GApplication registers the app ID on the session bus so only one copy runs. The name is
      the app ID and matches the desktop file. Without the slot the app does not start.

where:

  • : the name of the interface as defined in the snapcraft.yaml .
  • interface: the interface being requested. Only required if different from interface-name
  • attributes: the interface attributes. Only required if attribute are defined in the snapcraft.yaml.
  • request-type: one of installation (ie. permission to upload the snap to the store using this interface), connection (ie. permission to allow the snap interface to be connected) or auto-connection (ie. permission for the snap interface to be automatically connected when the snap is installed).

Example request:

name: foo-snap
description: audio player and recorder
snapcraft: https://github.com/jslarraz/foo/snapcraft.yaml
upstream: https://github.com/jslarraz/foo
upstream-relation: maintainer
plugs:
  audio-record:
    request-type: auto-connection
    reasoning: this is needed to record the microphone, which is one of the core
      functionalities of the snap.
  dot-config-foo:
    interface: personal-files
    attributes:
      write: $HOME/.config/foo
    request-type: auto-connection
    reasoning: the application needs to access its configuration files 
  removable-media
    request-type: manual-connection
    reasoning: media files are frequently stored in external disk. 
slots:
  com-jslarraz-foo:
    interface: dbus
    attributes: 
      bus: session
      name: com.jslarraz.foo
    request-type: manual-connection
    reasoning: Notte is a Flutter/GTK3 desktop application that requires 
      a D-Bus session bus slot (com.notte.notte) for proper desktop integration. 
      The GTK toolkit registers on the session bus for window management, 
      single-instance enforcement, and accessibility services. The bus name 
      matches the application ID. Without this slot, the app fails AppArmor 
      policy checks on launch.

This request has been added to the queue for review by the @reviewers team.

A correction before review: from Echofiles 1.0.8 the app ID is app.echofiles.Echofiles (we dropped the old product name), so the D-Bus slot is now:

slots:
  dbus-app:
    interface: dbus
    attributes:
      bus: session
      name: app.echofiles.Echofiles
    request-type: manual-connection

Everything else in the request is the same. Revisions 3 (amd64) and 4 (arm64) are the 1.0.8 uploads with the new name. I’m removing revisions 1 and 2 (the old name) from the review queue.

Hi @brharrow

I’ve granted echofiles use of the well-known “app.echofiles.Echofiles” dbus name. This is now live.

Regarding removable-media, auto-connection is restricted to a very limited range of applications (i.e. major browsers, email clients, media editors/players/recorders) as per the Process for aliases, auto-connections and tracks - Snap documentation.

I don’t believe echofiles fits any of these application groups, and therefore I think it should stick to manual-connection. The usual recommendation is to use snapctl is-connected to check if the interface is connected at startup / runtime, and prompt the user to connect it if needed. This enables the user to decide.

Thanks