Python should reset PulseAudio | UBports Forum

Hi there,
in the UT terminal the following command is executed flawlessly:

pulseaudio -k

Pulseaudio stops and a few seconds later it starts again.

If I try a clickable script with python section:

import os
import signal
import subprocess

pulseStop = 'pulseaudio -k'

def procPulseReset(name):
  os.system(pulseStop)

I get following message:

E: [pulseaudio] main.c: Konnte Prozess nicht abbrechen: No such process

I’ve set AppArmor policy “audio”.
Have someone an idea where is the problem ?

Read more here: Source link