On Thu, 25 Sep 2014 02:14:46 +0200
Valerio Vanni <[email protected]> wrote:

> Package: timidity-daemon
> Version: 2.13.2-40.1
> Followup-For: Bug #745373
> 
> >  - change the home dir of the timidity user (e.g. with usermod) to
> >    /var/run/timidity where he actually has writing rights.
> 
> I've tried to change it by hand in /etc/passwd.
> But it doesn't work, midi applications still require exclusive access.
> 

You are right Valerio, my proposal merely fixes the error about not
finding the cookie.

> 
> I get these message  trying to start a midi application (but they are present
> even when timidity works thanks to no concurrency)
> 
> Sep 25 02:07:16 newton pulseaudio[28411]: [pulseaudio] server-lookup.c: Unable
> to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to 
> autolaunch
> a dbus-daemon without a $DISPLAY for X11
> Sep 25 02:07:16 newton pulseaudio[28411]: [pulseaudio] main.c: Unable to
> contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a
> dbus-daemon without a $DISPLAY for X11
> 

I think the issue is that timidity is started at system boot, in
particular before pulseaudio, as the timidity user, while pulseaudio is
launched at login from the user session.

Maybe the definitive solution is to launch a timidity instance when the
user logs in.

I tried this way.

1. Remove /etc/init.d/timidity

2. Add a systemd user unit for timidity in a file
named /etc/systemd/user/timidity.service (a package would copy it
in /usr/lib/systemd/user instead), this is the unit file:

--------------------------------------------------------------------
[Unit]
Description=TiMidity++ Daemon
After=sound.target

[Service]
ExecStart=/usr/bin/timidity -iA -Os

[Install]
WantedBy=default.target
--------------------------------------------------------------------

3. Enable the unit for all users:
sudo systemctl --global enable timidity.service
a package could call that in a postinst hook.

Now log out from every user session and at the next login the timidity
instance should be loaded as the user itself and would play nicely with
pulseaudio, it will be seen as an alsa plugin.

Could you please test this way and let me know if it solves the problem
for you?

If so we could prepare patches for the timidity package, if the
maintainer agrees.

Ciao ciao,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to