Omninput: dbus slot, uinput, raw-input, hardware-observe, ssh-keys, personal-files and system-files

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: omninput
description: Shares one keyboard and mouse between the computers on a desk (Windows, macOS and Linux), like Barrier
  or Input Leap, and shares the clipboard and sound between them. Strictly confined.
snapcraft: PRIVATE
upstream: PRIVATE
upstream-relation: developer and publisher (Ontiqo Pty Ltd)
plugs:
  uinput:
    request-type: auto-connection
    reasoning: needs installation and auto-connection. When the shared mouse moves onto this computer, the app types
      and moves the pointer here through a virtual keyboard and pointer on /dev/uinput. This is how the computer
      receives input; it never reads input through uinput. The person also installs a udev rule once (the app
      shows the command), so nothing gets the device without them.
  raw-input:
    request-type: auto-connection
    reasoning: to share this computer's keyboard and mouse, the app reads them from /dev/input/event* and grabs them
      while input goes to another computer, so keys don't also act here. It only opens devices udev marks as
      keyboard, mouse or touchpad, and releases them when input comes back.
  hardware-observe:
    request-type: auto-connection
    reasoning: read only. Monitor EDID from /sys/class/drm, to tell which computers share a monitor, and input
      device details from /sys and udev.
  ssh-keys:
    request-type: auto-connection
    reasoning: the app can set up SSH between the person's own computers. It runs ssh and reads ~/.ssh.
  dot-ssh:
    interface: personal-files
    attributes:
      write: $HOME/.ssh
    request-type: auto-connection
    reasoning: for the same SSH setup it creates ~/.ssh/omninput_ed25519, adds the person's other computers to
      authorized_keys when they approve them, and adds one Host entry per computer to ~/.ssh/config. Existing
      entries are kept.
  etc-ssh:
    interface: system-files
    attributes:
      read: /etc/ssh/sshd_config, /etc/ssh/sshd_config.d, /etc/ssh/ssh_host_ed25519_key.pub,
        /etc/ssh/ssh_host_ecdsa_key.pub, /etc/ssh/ssh_host_rsa_key.pub
    request-type: auto-connection
    reasoning: read only. Finds which authorized keys file the local SSH server uses, and gives the person's other
      computers this computer's public host keys for their known_hosts.
slots:
  dbus-app:
    interface: dbus
    attributes:
      bus: session
      name: com.ontiqo.Omninput
    request-type: manual-connection
    reasoning: GTK 4 app. GApplication registers the app ID on the session bus so only one window runs, and GNOME
      Shell uses it to reach the app. The name is the app ID and matches the desktop file.

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.

Hi @brharrow

+1 from me for granting the dbus interface and auto-connection of hardware-observer interface.

Regarding ssh-keys, dot-ssh and etc-ssh: I understand why the application needs these interfaces but given the nature of the information present on these directories, -1 from me to grant auto-connection to these interfaces. Rather than relying on host, I would suggest you to create app specific SSH key pairs and store them inside the $SNAP_DATA_DIR and use it from there.

Regarding uinput and raw-input: These are super-privileged interfaces and auto-connection is rarely granted given the nature of the interfaces. I have not tested it but from Barrier’s snapcraft.yaml, I can see that they are not using any of the super-privileged interfaces to achieve the similar functionality. -1 from to grant auto-connection/installation to both of these interfaces.

What do other reviewers think?

Thanks @shishirsub10.

SSH: done as you suggested. The key pair now lives in $SNAP_USER_COMMON/ssh. We’ve dropped ssh-keys and etc-ssh. dot-ssh now covers only ~/.ssh/authorized_keys and ~/.ssh/config, plus a temp file for each so they’re written safely. Those two files are what the feature needs: they let the user’s other computers log in, and make ssh <computer> work. Manual connection is fine.

uinput and raw-input: we’ve dropped the auto-connect request. Users connect both themselves, in the same one-time command that installs the udev rule they need anyway. We only ask to be allowed to install with uinput.

I looked into Barrier’s snap after your comment (with help from an AI assistant). As far as I can tell it uses X11, which can’t send or capture input under Wayland, Ubuntu’s default. Omninput uses uinput so it works under both. Without it, the snap can’t receive input from another computer, which is the main thing it does.

Updated request:

  • dbus slot, hardware-observe: auto-connect (already +1)
  • uinput: install only
  • dot-ssh (the two files above): install only
  • ssh-keys, etc-ssh: withdrawn

The next upload includes these changes.

Hello @brharrow,

Thank you for the updated request. I agree with @shishirsub10 above this is a +1 from me for granting the dbus slot and auto-connection for the hardware-observe interface.

As for dot-ssh, this is a -1 from me for granting use-of/installation. We do not generally grant personal-files access in this way, my understanding is that this is highly-privileged write access for an optional feature of the snap.

Lastly, given the restrictions under wayland you outlined and that this is the core snap functionality, I believe this is a +1 from me for granting manual connection for the uinput interface: pending successful publisher vetting.

@jslarraz what are your thoughts on this manual-connection use-case?

Thanks @elisehdy.

dot-ssh: dropped. The snap no longer touches ~/.ssh at all. Its key, the other computers’ keys and their Host entries all live in $SNAP_USER_COMMON/ssh. The one-time setup command people already run for the udev rule adds a drop-in to /etc/ssh/sshd_config.d so sshd also reads that keys file, and adds one Include line to the user’s own ~/.ssh/config so ssh <computer> works. The user does both, not the snap.

Updated request:

  • dbus slot, hardware-observe: auto-connect
  • uinput: install, manual connection
  • dot-ssh, ssh-keys, etc-ssh: withdrawn

Happy to go through publisher vetting. Let me know what you need.

Great! Thank you for your understanding.

As this is a private snap, please pursue publisher vetting through the Verified Account process as described in this forum post and notify us here once verification is complete!

Hi @brharrow

Since capturing input is a core functionality of the application and given the challenges in wayland, I am happy to support your initial auto-connection request for uinput interface given the publisher vetting process is completed successfully.

Thanks @shishirsub10, much appreciated.

In that case we’d like to go back to the original request for uinput: installation and auto-connection, once publisher vetting is complete. Without it, the computer can’t receive input from the shared keyboard and mouse until the person runs an extra snap connect. The udev rule that controls access to /dev/uinput is still installed by the one-time setup command, so the person still decides once.

Meanwhile, so the snap is useful while vetting runs, the next revision drops the uinput plug. It types and moves the pointer through the desktop’s RemoteDesktop portal (libei), and the person allows remote interaction once in the desktop’s dialog. That revision needs only the parts you’ve both already +1’d. Could the dbus slot (com.ontiqo.Omninput) and auto-connection of hardware-observe be granted now, so it can pass review?

Updated request:

  • dbus slot, hardware-observe auto-connect: please grant now (+1 from @shishirsub10 and @elisehdy)
  • uinput: install and auto-connect, pending publisher vetting (it’ll return in a later revision)
  • raw-input: manual connection, no request
  • dot-ssh, ssh-keys, etc-ssh: withdrawn

Publisher vetting is under way in Verified publisher request: Ontiqo Pty Ltd. We’ll post here once it’s complete.