[X2Go-User] Pulseaudio doesn't start on Win7
Ralf
x2go-list at bergfelde.homelinux.net
Fri Dec 5 11:16:07 CET 2014
Hi!
I did some further research and now it is running as desired:
First part has nothing to do with x2go - it's a pulseaudio problem or
more specific a driverproblem with Intel-Onboardsound.
Pulseaudio will terminate with a nasty error on win7. Can be seen by
running pulseaudio.exe in an administrative command-window.
This can be solved if the line
load-module module-waveout sink_name=output source_name=input
is edited to
load-module module-waveout record=0 sink_name=output source_name=input
in the default.pa
... and there comes the problem with the pulseaudio from x2go. There is
no default.pa to be edited.
I have taken the lastest pulseaudio for windows (1.1) and started it
manually before connecting with x2go.
Check with pulseaudio.exe --dump-conf to be sure your edited default.pa
is used.
Starting pulseaudio by hand before an x2go-session brings the next
problem:
The x2go-client tries to start pulseaudio automatically and if the
standardport 4713 is already in use it takes the next free port.
Here 4714 ... although it will not start (remember the first problem
with driver) it gives this port as targetserver to his session.
This will end in no audiosound - running pulse on pc is on port 4713,
the x2go-session will send to 4714 -> no way.
There are two ways to avoid this:
Easy way: First start x2go-session without audioforward over ssh, then
start pulseaudio on commandline.
You can check with netstat -a if pulseaudio occupies port 4713 on your
windows pc and in your x2go-session have a look at 'less
$PULSE_CLIENTCONFIG'
if your windowspc is used as targetserver by pulseaudio with the right
port.
This way works fine for people knowing what to do and which are
comfortable using a commandline.
For automated deploying dockercontainers to "normal user staff" do
following:
Attention these are "bad" ideas, because something is hardcoded and
must be kept in mind when changing for example the
dockercontainer-image.
If people should use a "full" desktop put following little script in
/etc/profile.d and make it executable for all:
write_pulseclient_conf.sh
--------------------------------------------------------
#!/bin/sh
PORT=4731
SERVER=`echo $SSH_CONNECTION | awk -F " " '{print $1}'`
echo "default-server = "$SERVER":"$PORT > $PULSE_CLIENTCONFIG
--------------------------------------------------------
this will overwrite the "wrong" conf send be x2go-client and change the
pulseserver-port to whatever you have choosen.
Here 4731
For people who should only get a windowed application like iceweasel it
get's more complicated, because they are not loading a profile.
But it works this way ...
Take the script /usr/bin/x2goruncommand.
Search the line:
echo "exec $cmd" >> "$MESSAGE_FILE"
Add after that line the following line:
/etc/profile.d/write_pulseclient_conf.sh
This will run the little script from above everytime a x2go-session is
started (yes it will run 2 times when someone connects to a full
desktopsession, but it is an ugly hack, right?)
So there is only one question left:
How to change the pulseaudio-serverport on your windows?
Again it is the default.pa .
Search:
load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1
Change to:
load-module module-native-protocol-tcp listen=0.0.0.0 port=4731
auth-anonymous=1
... and done. Simple after reading the pulseaudio docs on modules ...
and don't expect to find the "port=" in the doc about
module-native-protocol-tcp :)
Famous last words ... this is my way how it works for me in an internal
network, where security is less then "in the wild". The audio-connection
is NOT encrypted this way.
Audio is not that good, but enough to have a look at trainingvideos on
eg. youtube - make sure to use html5 ... flashaudio is horrible in this
szenario.
Many thanks to uncountable websites and others for the view into the
mechanics of pulseaudio ...and to the x2go-team to write readable code
:)
Have a nice time
Ralf
Am 13.11.2014 19:07, schrieb Ralf:
> Hello list, greetings!
>
> I have the following setup runing:
> A docker-container providing a rudimental desktop (fluxbox on debian)
> A Win7PC which gets the desktop using x2Go.
>
> All is working as expected but the pulseaudio server on the
> win7-client doesn't start automatically.
> If I use an external pulseaudio.exe with an lightly modified
> default.pa the pulseaudio-sever starts.
> After that "trick" I have to edit .pulse-client.conf in my
> docker-container for sending audio to my win7-pulseserver and it will
> work.
> The drawback is: I cannot use the ssh-tunnel from x2go for the audio
> ... it is not established cause of the missing port of the not
> startet
> "internal" pulseserver.
>
> Is there a chance to give an modified default.pa to the "internal"
> pulseaudio-server of the x2go-client or even better: is it possible
> to
> use an "external" pulseaudio.exe with the x2go-client?
>
> The next "problem" for an automated workaround (starting pulseaudio
> with script prior to the x2go-client) is, that the x2go-client seems
> to use port 4714 for untunneled connections. Does someone now the
> parameter for changing the pulseaudio-serverport from 4713 to 4714
> for
> the pulse-audio-windows-version 1.1? This is the most "dirty" hack
> ...
> but should do the work in this case. The other way round is of course
> although possible: change the port the x2go-client expects his
> "internal" server. This way the .pulse-client.conf in the
> docker-desktop would be build correct for this szenario.
>
> Maye someone point me the direction?
>
> Uhhh ... its long ago I have written text in english
>
> Have a nice day!!
> _______________________________________________
> x2go-user mailing list
> x2go-user at lists.x2go.org
> http://lists.x2go.org/listinfo/x2go-user
More information about the x2go-user
mailing list