Subject: pulseaudio messages filling server logs

From: Ville Salmela <[email-masked]>
Date: Wed, 11 Dec 2019 14:44:45 +0200 (EET)

Package: x2goclient 
Version: 4.1.1.1 

x2goserver logs are filled with these: 
Dec 11 12:05:08 server pulseaudio[25146]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:08 server pulseaudio[25148]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:10 server pulseaudio[25156]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:10 server pulseaudio[25158]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:12 server pulseaudio[25162]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:12 server pulseaudio[25164]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:14 server pulseaudio[25172]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:14 server pulseaudio[25174]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:16 server pulseaudio[25178]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:16 server pulseaudio[25180]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:19 server pulseaudio[25183]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 
Dec 11 12:05:19 server pulseaudio[25185]: [pulseaudio] main.c: User-configured server at localhost:48283, refusing to start/autospawn. 

ssh is using ssh pipe to connect to the pulseaudio server of the client. When a session is disconnected this pipe is cut and apps using pulseaudio clients are trying respawn the pulseaudio found in x2goserver which they should not do. The following patch tells them not to try that and the issue is fixed. 

--- 1/x2goclient-4.1.1.1/src/onmainwindow.cpp 2018-02-15 22:42:31.000000000 +0200 
+++ 2/x2goclient-4.1.1.1/src/onmainwindow.cpp 2019-12-11 14:16:27.000000000 +0200 
@@ -5674,8 +5674,13 @@ 
"/.pulse-cookie"+ 
"\" >> \"${HOME}/.x2go/C-"+ 
resumingSession.sessionId+ 
+ "/.pulse-client.conf\"" 
+ ";echo \"autospawn=no\" >> " 
+ "\"${HOME}/.x2go/C-"+ 
+ resumingSession.sessionId+ 
"/.pulse-client.conf\""; 

+ 
sshConnection->executeCommand (scmd); 

bool sysPulse=false;