Audacity 2.2.0 snap issues

The Audacity Team have announced a much anticipated new release of the defacto audio editor Audicity.

At lunch I took a quick look at snapping it, but I’ve come a little stuck. I wondered if someone had some time to take a look at it and perhaps build on what I’d done to make a working confined snap?

I put the code in an audacity-snap junk branch on launchpad.

I used the desktop-gtk2 launcher, and added the interesting alsa workaround to get alsa working, although not tested that yet. It builds with snapcraft cleanbuild but once installed, doesn’t run. It seems audacity wants to put temp files in /var/lib/audacity-$USER/ which is inaccessible in the snap. You can see the errors in the README I put in the branch.

[Mon Nov  6 13:02:35 2017] audit: type=1400 audit(1509973353.692:16067): apparmor="ALLOWED" operation="unlink" profile="snap.audacity.audacity" name="/var/tmp/audacity-alan/.audacity.sock" pid=18827 comm="audacity" requested_mask="d" denied_mask="d" fsuid=1000 ouid=1000

It doesn’t appear you can set an environment variable to override this, but instead set it in the audacity.cfg which for us lives in ~/snap/audacity/current/.audacity-data/. We could ship a cfg or write one out (if it doesn’t exist) on install of the snap, but the cfg doesn’t support variables, so we can’t use $SNAP_USER_DATA or $SNAP_USER_COMMON in the cfg file.

We could patch the source of audacity, or something else?

Anyone fancy taking a look at this?

1 Like

Isn’t it configurable?

  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]

I’ve got a snap with source at I haven’t looked at it in a while but I think it works. it’s currently sitting in candidate:

sudo snap install audacity --candidate
1 Like

It stuck after showing the splash image and floods my terminal with the following message:

(audacity:29340): Pango-CRITICAL **: pango_font_description_set_size: assertion 'size >= 0' failed

also snappy-debug gives the following message:

= AppArmor =
Time: Jun 26 03:29:38
Log: apparmor="DENIED" operation="open" profile="snap.audacity.audacity" name="uid=12345 ouid=0
File: /dev/snd/controlC0 (read)
* add 'alsa' to 'plugs'