AUDIODEV should be exported when using pulseaudio
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
esound (Ubuntu) |
Invalid
|
Wishlist
|
Martin Pitt |
Bug Description
I'm using Ubuntu Hardy and have pulseaudio instead of esd installed.
Many apps (like xchat-gnome) still use the old esd libraries, and so i have to use the compatibility layer.
When starting xchat-gnome it spends lot of time, about a minute, trying to connect to esd - without success.
During that time the program seems frozen.
I took a look at the strace output during that time and i recognized:
access(
It seems like pulseaudio creates the compatibility sockets in places like /tmp/.esd-$UID but does not link them to /tmp/.esd, which seems like a good decission for multi-user environments, so i don't think it would be good to change this behaviour.
But i found another workaround:
If you look at util.c (in the esound sources), you can see, that it composes the dirname to look for the socket of /tmp/.esd and the content of the environment variable $AUDIODEV
So if you set $AUDIODEV to "-$UID" it can find the socket and does not waste one minute trying and failing to connect.
I tried:
AUDIODEV="-$UID" xchat-gnome
and everything went as expected, the program was no longer frozen after starting.
So to make things work for programs still using old esd-libraries in combination with pulseaudio AUDIODEV should be exported in some place it would be set for every program in the users session.
description: | updated |
I created the attached file as /etc/X11/ Xsession. d/51pulseaudio- esd (i just chose a number before the 55 of the .gnomerc so it could be easily overwritten by that).
This way AUDIODEV is set on every login through gdm for every user. Should work for kdm, too, but i haven't tested it.
Only programs started with sudo would not have set the correct AUDIODEV-value.