2007-12-18 04:01:02 |
Sebastian Keller |
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("/tmp/.esd/socket", R_OK|W_OK) = -1 ENOENT (No such file or directory)
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, 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" gnome-xchat
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. |
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("/tmp/.esd/socket", R_OK|W_OK) = -1 ENOENT (No such file or directory)
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. |
|