From ionic@ionic.de  Tue Mar 28 14:19:25 2017
Received: (at 1155) by bugs.x2go.org; 28 Mar 2017 12:19:26 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.1 required=3.0 tests=BAYES_20,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS autolearn=ham autolearn_force=no
	version=3.4.1
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 3DB525DAD1
	for <1155@bugs.x2go.org>; Tue, 28 Mar 2017 14:19:24 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LLp8y2AeGGbP for <1155@bugs.x2go.org>;
	Tue, 28 Mar 2017 14:19:17 +0200 (CEST)
Received: from Root24.de (powered.by.root24.eu [5.135.3.88])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 934B65DAD0
	for <1155@bugs.x2go.org>; Tue, 28 Mar 2017 14:19:17 +0200 (CEST)
Received: from nopileos.local (178.162.222.163.adsl.inet-telecom.org [178.162.222.163])
	by mail.ionic.de (Postfix) with ESMTPSA id BA04E4F00145;
	Tue, 28 Mar 2017 14:19:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ionic.de; s=default;
	t=1490703557; bh=/VUTi86UfmmHZTUMGHmyG8FykK9I4Hevf/vq2VKYEYI=;
	h=Subject:To:References:From:Date:In-Reply-To:From;
	b=Rue29xZiM1+8XDWjnUTqPqbMTq8GIXLXMjQZRPIlO0K9zkvKlpj72PbYN7trwHqwj
	 xlXzBav/4T2eu1xAurqAQ/tlGeOl8ruFXMwS6ETUIpBAtmcsu0nqSP64+p2tSJvfkD
	 ui+2iFmoPCavFbJlCYPmC+R8jChbv3KdKhX38kn4=
Subject: Re: Volume levels are not saved with TCE
To: Walid MOGHRABI <w.moghrabi@servicemagic.eu>, 1155@bugs.x2go.org
References: <75149176.888907.1490686875815.JavaMail.root@servicemagic.eu>
From: Mihai Moldovan <ionic@ionic.de>
Message-ID: <04c30efe-21d7-28dc-3a65-37cf96255d99@ionic.de>
Date: Tue, 28 Mar 2017 14:19:12 +0200
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0)
 Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <75149176.888907.1490686875815.JavaMail.root@servicemagic.eu>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="hASSrmr6XlKHu0dkVCeciqQwF2hd611Ck"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--hASSrmr6XlKHu0dkVCeciqQwF2hd611Ck
Content-Type: multipart/mixed; boundary="9Cdo4LVEA6AmvbO1CJkEr8FsAKgDUmdiR";
 protected-headers="v1"
From: Mihai Moldovan <ionic@ionic.de>
To: Walid MOGHRABI <w.moghrabi@servicemagic.eu>, 1155@bugs.x2go.org
Message-ID: <04c30efe-21d7-28dc-3a65-37cf96255d99@ionic.de>
Subject: Re: Volume levels are not saved with TCE
References: <75149176.888907.1490686875815.JavaMail.root@servicemagic.eu>
In-Reply-To: <75149176.888907.1490686875815.JavaMail.root@servicemagic.eu>

--9Cdo4LVEA6AmvbO1CJkEr8FsAKgDUmdiR
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 28.03.2017 09:41 AM, Walid MOGHRABI wrote:
> Well, I would like the settings to be saved inside the X2Go session the=
n restored from there.
> I know TCEs are read only (or volatile) so you can't save the client se=
ttings there and then get them back from there.
> From a local client with X2Go client installed, it works of course sinc=
e 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 :
>=20
>     1) save the volume levels at the X2Go session level when closing th=
e session (maybe something that can be done through a logout script or th=
e x2gocleansession process)
>     2) retrieve the volume levels from the X2Go session and use it to s=
et the local pulseaudio settings (probably through geting values from sav=
ed settings through SSH at connection time)
>=20
> This could be activated only in --thinclient mode so that, normal X2Goc=
lient 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 abo=
ut here
is a client-side setting.

In a simple setup where only one client machine ever connects to one sess=
ion,
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 s=
ettings
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, becaus=
e
saving the settings must be done while the client is still connected (sin=
ce 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 does=
n'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 th=
at.


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


--9Cdo4LVEA6AmvbO1CJkEr8FsAKgDUmdiR--

--hASSrmr6XlKHu0dkVCeciqQwF2hd611Ck
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJY2lTDAAoJEB/WLtluJTqHxvEP/Ry4w065YHTzQ7/u9wT0/bvW
zqUcL6IR+I5b9YR4McolanldPu/vI7O+IbQd0v0n1/uzzHY3sLzFLW0OVNvOL73i
wHdAKZ3oRrTH1TpHXtsAq38jyPV7lN4YBj182iwMN5Hj+n/flzGW9zCkrSiutf/L
FU0H+kngbYcyoljaNBeqkgpwPqF5T4y0E9tqZHuY9wc3lkYr32PbGsTFL+09D8BD
lnCh9m16k1It5TG1BGf/sADjZDYLeo/mKf96F5n241pjnXclVOK4KKygLjYw72l9
XOlkOsN+iwACFx0FB1T6Nc2LMDT3s/jgYayR03l4JMMHiKg2+zjbj/cJdswsyTHI
eUbr7kwW20kW2C9o28oeSg14dsEH2Z9DSH4f4IvbTYI6GFps9viaLcJpZpmCSFEw
8WgUdrrCMZYkyu6OP63Nny29GYkrVWhd8qABRmsQ72F45BOgnrFQgbvM7JLHFh6J
0akdZcCXb0AfukTvu/5zuxgeGeSUUJNRQy03TccKFz3Sqkx7cJsL7RiqVS7xsP1V
gb7/0f1uUYy/4sb0uxh9caVb+H2TPYvTYdcnCrZ2X3k8ujRxwxy/mDTSMcX9YIr/
1AAbiOj+RW4/Q6LarPS4Sw5d6nJEdj809Hg+i1y2MmlZxEj2XCZnheaaMGpBb0SN
YPu110nAc8rQDBXZYGFJ
=weF6
-----END PGP SIGNATURE-----

--hASSrmr6XlKHu0dkVCeciqQwF2hd611Ck--

