How do you use Timidity on Ubuntu 18.04?
Timidity is available in the default repo via sudo apt install timidity, which includes a service daemon. However, this daemon appears to be broken out of the box, as Timidity produces no sound and service timidity status shows several errors interacting with pulseaudio:
● timidity.service - LSB: start and stop timidity
Loaded: loaded (/etc/init.d/timidity; generated)
Active: active (exited) since Sun 2020-05-10 14:27:02 EDT; 1s ago
Docs: man:systemd-sysv-generator(8)
Process: 2407 ExecStop=/etc/init.d/timidity stop (code=exited, status=0/SUCCESS)
Process: 2416 ExecStart=/etc/init.d/timidity start (code=exited, status=0/SUCCESS)
May 10 14:27:02 caius systemd[1]: Starting LSB: start and stop timidity...
May 10 14:27:02 caius timidity[2416]: * Starting TiMidity++ ALSA midi emulation...
May 10 14:27:02 caius timidity[2416]: ...done.
May 10 14:27:02 caius systemd[1]: Started LSB: start and stop timidity.
May 10 14:27:02 caius pulseaudio[2448]: [autospawn] core-util.c: Home directory not accessible: Permission denied
May 10 14:27:02 caius pulseaudio[2448]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
May 10 14:27:02 caius pulseaudio[2448]: [pulseaudio] main.c: Failed to acquire autospawn lock
How do you fix this?
A user in the audio group has exclusive access to the pulseaudio server. Other users can not access it while this user uses it. Therefore user should not be in the audio group.
Also, if timidity.service is created within ~/.config/systemd/user/, sudo should not be used to enable the user service.
– Sea Monkey Jun 27 '20 at 01:10