[Slackbuilds-users] TiMidity++ as daemon, failure to connect to pulseaudio

Rubén Llorente porting at use.startmail.com
Mon Jul 23 13:25:27 UTC 2018


Hello.

The instructions provided in TiMidity++'s Slackbuild page for running                             
it as a daemon/alsa sequencer don't work.
https://slackbuilds.org/repository/14.2/audio/TiMidity++/                                          

rc.timidity will have the daemon started, but it will fail to generate                             
any sound output.

I suspect that, when I start a desktop session, a pulseaudio instance                              
under the privileges of my user gets started. TiMidity++, running as a                             
root daemon, is not authorized to inject sound into Pulseaudio because                             
it is a different user than my desktop one.

Could somebody else reproduce this problem and confirm it?                                         

A possible solution would be to run pulseaudio as a system wide daemon,                            
but that is too problematic.

Another possible solution would be to apply something like this:                                   
https://wiki.archlinux.org/index.php/PulseAudio/Examples#Allowing_multiple_users_to_use_PulseAudio_at_the_same_time

My suggestion, if this issue is reproducible and shown to be caused for                            
the above reasons, is to update the slackbuild in the following ways:

1- Recommend the creation of a timidity user for running as a daemon.
Running the daemon as root is a bit dangerous.
2- Modify rc.timidity for starting the daemon under the privileges of
said user.
3- Recommend the solution posted in the Arch wiki. I have yet to try it,
and is also a bit dangerous because it allows system-wide access to the
daemon run by the user to everybody in the system, unless you take
additional messures (such as changing the permissions of the socket?)

Trivial solution is to start timidity with the desktop session, running
with the privileges of the user sitting in front of the machine.

-- 
OpenPGP Key Fingerprint:
BB5A C2A2 2CAD ACB7 D50D  C081 1DB9 6FC4 5AB7 92FA


More information about the SlackBuilds-users mailing list