Pacmd return non-zero

I am working in package software but I got this message after launch it

pacmd list-sources | grep -e device.description

I installed requires dependencies

snapcraft.yml

name: green-recorder # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: "0.1" # just for humans, typically '1.2+git' or '1.3.2'
summary: A simple screen recorder for Linux desktop. Supports Wayland & Xorg  # 79 char long summary
description: |
  A simple desktop recorder for Linux systems. Built using Python, GTK+ 3 and ffmpeg. It supports recording audio and video on almost all Linux interfaces. Also, Green Recorder is the first desktop program to support Wayland display server on GNOME session.
  The following formats are currently supported: mkv, avi, mp4, wmv, gif and nut (And only WebM for Wayland's GNOME session). You can stop the recording process easily by right-clicking the icon and choosing "Stop Record". Or middle-clicking the recording icon in the notifications area (but doesn't work on all interfaces).
  You can choose the audio input source you want from the list. You can also set the default values you want by simply changing them in the interface, and the program will save them for you for the next time you open it.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
  green-recorder:
    source: https://github.com/mhsabbagh/green-recorder
    source-type: git
    plugin: python
    python-version: python2
    stage-snaps:
      - ffmpeg
    stage-packages:
      - libgirepository1.0-dev
      - libgstreamer1.0-0
      - gstreamer1.0-plugins-base
      - gstreamer1.0-plugins-good
      - gstreamer1.0-pulseaudio
      - pulseaudio
      - gir1.2-appindicator3-0.1
      - libglu1-mesa
      - freeglut3
      - libgpm2
      - libslang2
      - imagemagick
      - gawk
      - gettext
    build-packages:
      - build-essential
    python-packages:
      - wheel
      - setuptools
      - PyGObject
      - urllib3
      - configparser
      - pydbus
    override-stage: |
      cp -r $SNAPCRAFT_PART_SRC/* $SNAPCRAFT_PART_INSTALL
      # chmod -x $SNAPCRAFT_PART_INSTALL/green-recorder
      snapcraftctl stage

apps:
  green-recorder:
    command: python $SNAP/green-recorder
    extensions:
      - gnome-3-28
    plugs:
      - desktop
      - audio-playback
      - audio-record
    slots:
      - dbus-daemon
    common-id: org.fosspost.green-recorder

slots:
  dbus-daemon:
    interface: dbus
    bus: session
    name: org.fosspost.green-recorder

The pacmd text based protocol is not made available to snaps. Instead use pactl, which uses the standard native protocol. At present, the access control hooks used to limit access to the microphone are part of the native protocol code, so we don’t have a reasonable way to restrict the pacmd protocol.

For your use case, pactl list sources should give you the information you’re after.

1 Like