Re: [X2Go-Dev] [X2Go-Commits] [x2goclient] 01/01: Add new brocker feature. Broker can send to client some configuration in the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the moment is suppor

2018-12-20 Thread Mike Gabriel

Hi Alex,

On  Fr 14 Dez 2018 12:37:09 CET, Oleksandr Shneyder wrote:


Hi Mike,

unfortunately it's not always possible to get the session state from
X2Go server. One simple example - direct RDP session. Another use case,
sometimes (for example because of security reasons), you can't have
access from X2Go Broker to X2Go Server.
Anyway if you are running the network with many clients, different kinds
of sessions (X2GO, XDMCP, RDP, DRDP), you'll appreciate the information
that you can collect from X2Go Clients.

regards
Alex


OK. Due to lack of time I won't added client-side session state to  
X2Go Session Broker before the upcoming major release. The change  
might become too invasive.


But it's on the list for later.

Mike
--

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de



pgpSXbKUBqsyx.pgp
Description: Digitale PGP-Signatur
___
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev

Re: [X2Go-Dev] [X2Go-Commits] [x2goclient] 01/01: Add new brocker feature. Broker can send to client some configuration in the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the moment is suppor

2018-12-14 Thread Oleksandr Shneyder
Hi Mike,

unfortunately it's not always possible to get the session state from
X2Go server. One simple example - direct RDP session. Another use case,
sometimes (for example because of security reasons), you can't have
access from X2Go Broker to X2Go Server.
Anyway if you are running the network with many clients, different kinds
of sessions (X2GO, XDMCP, RDP, DRDP), you'll appreciate the information
that you can collect from X2Go Clients.

regards
Alex

Am 14.12.18 um 10:05 schrieb Mike Gabriel:
> Hi Alex,
> 
> On  Mi 22 Aug 2018 09:01:15 CEST, Oleksandr Shneyder wrote:
> 
>> Hi Mike,
>>
>> this feature is activated by broker. If broker is not supporting it,
>> there are no changes in X2Go Client behavior. I never putting in master
>> branch commits that supposed to break compatibility with previous
>> versions.
>>
>> best regards
>> Alex
> 
> I have been looking into the events handling stuff once more and wonder
> what use case scenario you had in mind when adding the ability to
> TERMINATE or SUSPEND sessions from the broker via the client side?
> 
> The broker can suspend/terminate sessions server-side and the X2Go
> Client will follow automatically.
> 
> I understand that retrieving status information from the client is a
> nice thing to have, but what problem did you solve with the effort of
> adding the events code to X2Go Client?
> 
> Thanks+Greets,
> Mike
> 


-- 
---
Oleksandr Shneyder| Email: o.shney...@phoca-gmbh.de
phoca GmbH| Tel. : 0911 - 14870374 0
Schleiermacherstr. 2  | Fax. : 0911 - 14870374 9
D-90491 Nürnberg  | Mobil: 0163 - 49 64 461

Geschäftsführung:
Dipl.-Inf. Oleksandr Shneyder

Amtsgericht München | http://www.phoca-gmbh.de
HRB 196 658 | http://www.x2go.org
USt-IdNr.: DE281977973
---



signature.asc
Description: OpenPGP digital signature
___
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev

Re: [X2Go-Dev] [X2Go-Commits] [x2goclient] 01/01: Add new brocker feature. Broker can send to client some configuration in the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the moment is suppor

2018-12-14 Thread Mike Gabriel

Hi Alex,

On  Mi 22 Aug 2018 09:01:15 CEST, Oleksandr Shneyder wrote:


Hi Mike,

this feature is activated by broker. If broker is not supporting it,
there are no changes in X2Go Client behavior. I never putting in master
branch commits that supposed to break compatibility with previous
versions.

best regards
Alex


I have been looking into the events handling stuff once more and  
wonder what use case scenario you had in mind when adding the ability  
to TERMINATE or SUSPEND sessions from the broker via the client side?


The broker can suspend/terminate sessions server-side and the X2Go  
Client will follow automatically.


I understand that retrieving status information from the client is a  
nice thing to have, but what problem did you solve with the effort of  
adding the events code to X2Go Client?


Thanks+Greets,
Mike

--

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
mobile: +49 (1520) 1976 148
landline: +49 (4354) 8390 139

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de



pgpV73jgK2AfM.pgp
Description: Digitale PGP-Signatur
___
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev

Re: [X2Go-Dev] [X2Go-Commits] [x2goclient] 01/01: Add new brocker feature. Broker can send to client some configuration in the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the moment is suppor

2018-08-22 Thread Oleksandr Shneyder
Hi Mike,

this feature is activated by broker. If broker is not supporting it,
there are no changes in X2Go Client behavior. I never putting in master
branch commits that supposed to break compatibility with previous
versions. However you know my opinion about broker. The idea of broker
is to integrate X2Go in individual company infrastructure. This mean
that every broker that designed for my customers is also individual. I'm
not interested in the broker on git.x2go.org, neither any of my
customers. It's OK for me as example for any one who wants to develop
his own broker, but it's not a business solution.

best regards
Alex


Am 21.08.2018 um 17:57 schrieb Mike Gabriel:
> Hi Alex,
> 
> how well is the below feature tested with current x2gobroker that does
> not yet understand this feature?
> 
> I guess this patch is part of a paid project. Do you have budget for
> adapting x2gobroker on git.x2go.org, too?
> 
> Otherwise, I'd much prefer this commit on an extra branch for now, until
> the x2gobroker is adapted to this, too.
> 
> Ideally, your patch supports legacy brokers, which I assume it does...
> 
> Greets,
> Mike
> 
> On  Di 21 Aug 2018 15:43:05 CEST, git-admin wrote:
> 
>> This is an automated email from the git hooks/post-receive script.
>>
>> x2go pushed a commit to branch master
>> in repository x2goclient.
>>
>> commit 539e0a4268df3d78f88f6908506c18222743d84f
>> Author: Oleksandr Shneyder 
>> Date:   Tue Aug 21 15:42:52 2018 +0200
>>
>>     Add new brocker feature. Broker can send to client some
>> configuration in the section START_CLIENT_CONFIG - END_CLIENT_CONFIG.
>> For the moment is supported option events=bool. If true, client
>> sending to broker events: CONNECTING, CONNECTED, SUSPENDING,
>> TERMINATING, FINISHED. It's not a real session state, but rather the
>> state of X2Go Client.
>> ---
>>  debian/changelog |  5 +++
>>  src/httpbrokerclient.cpp | 86
>> 
>>  src/httpbrokerclient.h   |  5 +++
>>  src/onmainwindow.cpp | 86
>> +++-
>>  src/onmainwindow.h   | 15 -
>>  5 files changed, 187 insertions(+), 10 deletions(-)
>>
>> diff --git a/debian/changelog b/debian/changelog
>> index 5e22cd3..b0c0449 100644
>> --- a/debian/changelog
>> +++ b/debian/changelog
>> @@ -3,6 +3,11 @@ x2goclient (4.1.2.2-0x2go1) UNRELEASED; urgency=medium
>>    [ Oleksandr Shneyder ]
>>    * New upstream version (4.1.2.2):
>>  - Add SSH instruction to list of errors if keyboard-interactive
>> auth has failed.
>> +    - Add new brocker feature. Broker can send to client some
>> configuration in
>> +  the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the
>> moment is supported
>> +  option events=bool. If true, client sending to broker events:
>> CONNECTING,
>> +  CONNECTED, SUSPENDING, TERMINATING, FINISHED. It's not a real
>> session state,
>> +  but rather the state of X2Go Client.
>>
>>    [ Mihai Moldovan ]
>>    * New upstream version (4.1.2.2):
>> diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp
>> index f7fbaf1..ea5158e 100644
>> --- a/src/httpbrokerclient.cpp
>> +++ b/src/httpbrokerclient.cpp
>> @@ -270,6 +270,7 @@ void
>> HttpBrokerClient::slotSshUserAuthError(QString error)
>>  return;
>>  }
>>
>> +
>>  void HttpBrokerClient::getUserSessions()
>>  {
>>  QString brokerUser=config->brokerUser;
>> @@ -347,6 +348,66 @@ void HttpBrokerClient::selectUserSession(const
>> QString& session)
>>
>>  }
>>
>> +void HttpBrokerClient::sendEvent(const QString& ev, const QString&
>> id, const QString& server, const QString& client, const QString&
>> login, const QString& cmd, const QString& display, const QString& start)
>> +{
>> +    x2goDebug<<"Called sendEvent.";
>> +    QString brokerUser=config->brokerUser;
>> +    if(mainWindow->getUsePGPCard())
>> +    brokerUser=mainWindow->getCardLogin();
>> +
>> +    if(!sshBroker)
>> +    {
>> +    QString req;
>> +    QTextStream (  ) <<
>> + "task=clientevent&"<<
>> +
>> "user="<> + "sid="<> + "event="<> +
>> "server="<> +
>> "client="<> +
>> "login="<> + "cmd="<> +
>> "display="<> +
>> "start="<> + "authid="<> +    x2goDebug << "Sending request: "<< req.toUtf8();
>> +    QNetworkRequest request(QUrl(config->brokerurl));
>> +    request.setHeader(QNetworkRequest::ContentTypeHeader,
>> "application/x-www-form-urlencoded");
>> +    eventRequest=http->post (request, req.toUtf8() );
>> +
>> +    }
>> +    else
>> +    {
>> +    if (nextAuthId.length() > 0) {
>> +    sshConnection->executeCommand ( config->sshBrokerBin+"
>> --user "+ brokerUser +" --authid "+nextAuthId+
>> +   

Re: [X2Go-Dev] [X2Go-Commits] [x2goclient] 01/01: Add new brocker feature. Broker can send to client some configuration in the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the moment is suppor

2018-08-21 Thread Mike Gabriel

Hi Alex,

how well is the below feature tested with current x2gobroker that does  
not yet understand this feature?


I guess this patch is part of a paid project. Do you have budget for  
adapting x2gobroker on git.x2go.org, too?


Otherwise, I'd much prefer this commit on an extra branch for now,  
until the x2gobroker is adapted to this, too.


Ideally, your patch supports legacy brokers, which I assume it does...

Greets,
Mike

On  Di 21 Aug 2018 15:43:05 CEST, git-admin wrote:


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit 539e0a4268df3d78f88f6908506c18222743d84f
Author: Oleksandr Shneyder 
Date:   Tue Aug 21 15:42:52 2018 +0200

Add new brocker feature. Broker can send to client some  
configuration in the section START_CLIENT_CONFIG -  
END_CLIENT_CONFIG. For the moment is supported option events=bool.  
If true, client sending to broker events: CONNECTING, CONNECTED,  
SUSPENDING, TERMINATING, FINISHED. It's not a real session state,  
but rather the state of X2Go Client.

---
 debian/changelog |  5 +++
 src/httpbrokerclient.cpp | 86  


 src/httpbrokerclient.h   |  5 +++
 src/onmainwindow.cpp | 86  
+++-

 src/onmainwindow.h   | 15 -
 5 files changed, 187 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5e22cd3..b0c0449 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,11 @@ x2goclient (4.1.2.2-0x2go1) UNRELEASED; urgency=medium
   [ Oleksandr Shneyder ]
   * New upstream version (4.1.2.2):
 - Add SSH instruction to list of errors if keyboard-interactive  
auth has failed.
+- Add new brocker feature. Broker can send to client some  
configuration in
+  the section START_CLIENT_CONFIG - END_CLIENT_CONFIG. For the  
moment is supported
+  option events=bool. If true, client sending to broker events:  
CONNECTING,
+  CONNECTED, SUSPENDING, TERMINATING, FINISHED. It's not a real  
session state,

+  but rather the state of X2Go Client.

   [ Mihai Moldovan ]
   * New upstream version (4.1.2.2):
diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp
index f7fbaf1..ea5158e 100644
--- a/src/httpbrokerclient.cpp
+++ b/src/httpbrokerclient.cpp
@@ -270,6 +270,7 @@ void  
HttpBrokerClient::slotSshUserAuthError(QString error)

 return;
 }

+
 void HttpBrokerClient::getUserSessions()
 {
 QString brokerUser=config->brokerUser;
@@ -347,6 +348,66 @@ void HttpBrokerClient::selectUserSession(const  
QString& session)


 }

+void HttpBrokerClient::sendEvent(const QString& ev, const QString&  
id, const QString& server, const QString& client, const QString&  
login, const QString& cmd, const QString& display, const QString&  
start)

+{
+x2goDebug<<"Called sendEvent.";
+QString brokerUser=config->brokerUser;
+if(mainWindow->getUsePGPCard())
+brokerUser=mainWindow->getCardLogin();
+
+if(!sshBroker)
+{
+QString req;
+QTextStream (  ) <<
+ "task=clientevent&"<<
+  
"user="<
+ "sid="<+  
"server="<+  
"client="<
+ "login="<+  
"display="<
+ "start="post (request, req.toUtf8() );
+
+}
+else
+{
+if (nextAuthId.length() > 0) {
+sshConnection->executeCommand ( config->sshBrokerBin+"  
--user "+ brokerUser +" --authid "+nextAuthId+
+" --task clientevent --sid \""+id+"\" --event "+ev+"  
--server \""+server+"\" --client \""+client+"\" --login "+"\""+
+login+"\" --cmd \""+cmd+"\" --display \""+display+"\"  
--start \""+start+"\"",

+this,SLOT ( slotEventSent(bool,QString,int)));
+} else {
+sshConnection->executeCommand ( config->sshBrokerBin+"  
--user "+ brokerUser +
+" --task clientevent --sid \""+id+"\" --event "+ev+"  
--server \""+server+"\" --client \""+client+"\" --login "+"\""+
+login+"\" --cmd \""+cmd+"\" --display\" "+display+" \"  
--start \""+start+"\"",

+this,SLOT ( slotEventSent(bool,QString,int)));
+}
+}
+}
+
+
+void HttpBrokerClient::slotEventSent(bool success, QString answer, int)
+{
+if(!success)
+{
+x2goDebug<+ 
mainWindow->config.brokerEvents=st.setting()->value("events",false).toBool();

+if(mainWindow->config.brokerEvents)
+{
+x2goDebug<<"sending client events to broker";
+}
+}
+

 void HttpBrokerClient::createIniFile(const QString& raw_content)
 {
@@ -420,6 +491,17 @@ void HttpBrokerClient::createIniFile(const  
QString&