On 28.03.2017 09:41 AM, Walid MOGHRABI wrote: > Well, I would like the settings to be saved inside the X2Go session then restored from there. > I know TCEs are read only (or volatile) so you can't save the client settings there and then get them back from there. > From a local client with X2Go client installed, it works of course since it relies on the local settings that can be saved in this situation. > But thinclient mode is a bit different and I suppose there should be a way to : > > 1) save the volume levels at the X2Go session level when closing the session (maybe something that can be done through a logout script or the x2gocleansession process) > 2) retrieve the volume levels from the X2Go session and use it to set the local pulseaudio settings (probably through geting values from saved settings through SSH at connection time) > > This could be activated only in --thinclient mode so that, normal X2Goclient behaviour could keep on using the local pulseaudio settings and not geting the ones from the X2Go session. That's not really something we want to do, because the volume we talk about here is a client-side setting. In a simple setup where only one client machine ever connects to one session, and that client machine never changes, that might work, but in any more complicated setup it's a recipe for doom. Further, given that I know your setup a little bit, saving or restoring settings would not work as expected when for instance additional headsets are *not* plugged in while the session is established but later on. x2ogcleansessions is a totally wrong approach for stuff like that, because saving the settings must be done while the client is still connected (since we need to access the client-side PA daemon.) If anything, you could use x2goserver's hooks infrastructure, but I'm not sure in what context these scripts are executed. If it's any context that doesn't inherit environment variables from the client, that's not going to work. The pre-suspend/pre-terminate and post-resume/post-scripts hooks (check /usr/lib/x2go/extensions) might be promising places for something like that. Again, as a general feature that's probably causing more trouble than it's worth, especially when using multiple sessions at a time or when changing client-side stuff. Mihai