X2Go Bug report logs - #1228
Implement basic dialog handling in X2Go Server

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Alexey Nemov <alexnemov@protonmail.com>

Date: Thu, 26 Oct 2017 06:45:01 UTC

Severity: normal

Found in version 4.0.1.20

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Thu, 26 Oct 2017 06:45:01 GMT) (full text, mbox, link).


Acknowledgement sent to Alexey Nemov <alexnemov@protonmail.com>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 26 Oct 2017 06:45:01 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

From: Alexey Nemov <alexnemov@protonmail.com>
To: "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Subject: Ctrl-Alt-T doesn't terminate connection in "local desktop" sessions
Date: Thu, 26 Oct 2017 02:32:26 -0400
Package: x2goserver
Version: 4.0.1.20


Summary:
As stated in the wiki https://wiki.x2go.org/doku.php/wiki:advanced:nx-keyboard-shortcuts
The action "close_session" should terminate the session.
But, pressing Ctrl-Alt-t in a "local desktop" session does not "terminate" the session.


Steps to reproduce:
0. Create a new session profile in x2goclient with session type "Connect to local desktop";
1. Connect to remote computer using this session profile;
2. Press Ctrl-Alt-t at the client.

Expected behaviour:
The remote desktop window on the client should close, the connection should be terminated.

Actual behaviour:
The remote desktop window on the client does not close, the connection is not terminated.
The following log entries appears in the server's system journal:

```
Oct 26 13:50:39 localhost /usr/bin/x2gosuspend-session[31790]: session with ID alex-50-1508997021_stS1XSHADalexXSHADPP0_dp24 has been suspended successfully
Oct 26 13:50:45 localhost su[31900]: Successful su for alex by root
Oct 26 13:50:45 localhost su[31900]: + ??? root:alex
Oct 26 13:50:45 localhost su[31900]: pam_unix(su:session): session opened for user alex by (uid=0)
Oct 26 13:50:45 localhost systemd-logind[508]: New session c99 of user alex.
Oct 26 13:50:45 localhost systemd[1]: Started Session c99 of user alex.
Oct 26 13:50:46 localhost su[31900]: pam_unix(su:session): session closed for user alex
Oct 26 13:50:46 localhost su[31923]: Successful su for alex by root
Oct 26 13:50:46 localhost su[31923]: + ??? root:alex
Oct 26 13:50:46 localhost su[31923]: pam_unix(su:session): session opened for user alex by (uid=0)
Oct 26 13:50:46 localhost systemd-logind[508]: Removed session c99.
Oct 26 13:50:46 localhost systemd-logind[508]: New session c100 of user alex.
Oct 26 13:50:46 localhost systemd[1]: Started Session c100 of user alex.
Oct 26 13:50:49 localhost /usr/bin/x2gosuspend-session[32026]: session with ID alex-50-1508997021_stS1XSHADalexXSHADPP0_dp24 has been suspended successfully
Oct 26 13:50:50 localhost su[31923]: pam_unix(su:session): session closed for user alex
Oct 26 13:50:50 localhost systemd-logind[508]: Removed session c100.
Oct 26 13:50:53 localhost /usr/sbin/x2gocleansessions[12745]: alex-50-1508997021_stS1XSHADalexXSHADPP0_dp24: session status S desynchronized with current status (R) and session suspend already tried unsuccessfully
```


Other infomation:
0. Executing x2gosuspend-session <ID> on the server has the same effect as pressing C-A-t at the client.
1. Execuitng x2goterminate-session <ID> on the server does terminates the session and closes the client window.
3. Server-side /etc/x2go/keystrokes.cfg: http://paste.debian.net/plain/992795



-- System Information (server and client):
Debian Release: 9.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Thu, 26 Oct 2017 07:20:02 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 26 Oct 2017 07:20:02 GMT) (full text, mbox, link).


Message #10 received at 1228@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: Alexey Nemov <alexnemov@protonmail.com>, 1228@bugs.x2go.org
Subject: Re: [X2Go-Dev] Ctrl-Alt-T doesn't terminate connection in "local desktop" sessions
Date: Thu, 26 Oct 2017 09:17:28 +0200
[Message part 1 (text/plain, inline)]
Control: retitle -1 Implement basic dialog handling in X2Go Server

On 10/26/2017 08:32 AM, Alexey Nemov wrote:
> As stated in the wiki https://wiki.x2go.org/doku.php/wiki:advanced:nx-keyboard-shortcuts
> The action "close_session" should terminate the session.
> But, pressing Ctrl-Alt-t in a "local desktop" session does not "terminate" the session.

This is caused by the way we handle dialogs from nxagent. Currently, every
dialog (wrongly) spawns x2gosuspend-session for every message the agent wants to
show.

nxagent sends a KILL SESSION dialog when close_session is executed for
non-persistent sessions (like shadow sessions), but the default handler
x2gosuspend-session that is set via NX_CLIENT is x2gosuspend-session, which is
called and fails to suspend the session (since session suspension doesn't make
sense or works with non-persistent sessions.)

While the general goal should be to relay messages to the client side one day,
currently I want a small wrapper script on the server side which handles
server-side events in a better way.

Thus retitling this bug report.



Mihai

[signature.asc (application/pgp-signature, attachment)]

Changed Bug title to 'Implement basic dialog handling in X2Go Server' from 'Ctrl-Alt-T doesn't terminate connection in "local desktop" sessions' Request was from Mihai Moldovan <ionic@ionic.de> to 1228-submit@bugs.x2go.org. (Thu, 26 Oct 2017 07:20:02 GMT) (full text, mbox, link).


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Thu, 26 Oct 2017 08:10:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ulrich Sibiller <uli42@gmx.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 26 Oct 2017 08:10:02 GMT) (full text, mbox, link).


Message #17 received at 1228@bugs.x2go.org (full text, mbox, reply):

From: Ulrich Sibiller <uli42@gmx.de>
To: Mihai Moldovan <ionic@ionic.de>, 1228@bugs.x2go.org
Cc: Alexey Nemov <alexnemov@protonmail.com>
Subject: Re: [X2Go-Dev] Bug#1228: Ctrl-Alt-T doesn't terminate connection in "local desktop" sessions
Date: Thu, 26 Oct 2017 10:07:48 +0200
On Thu, Oct 26, 2017 at 9:17 AM, Mihai Moldovan <ionic@ionic.de> wrote:
> Control: retitle -1 Implement basic dialog handling in X2Go Server
>
> On 10/26/2017 08:32 AM, Alexey Nemov wrote:
>> As stated in the wiki https://wiki.x2go.org/doku.php/wiki:advanced:nx-keyboard-shortcuts
>> The action "close_session" should terminate the session.
>> But, pressing Ctrl-Alt-t in a "local desktop" session does not "terminate" the session.
>
> This is caused by the way we handle dialogs from nxagent. Currently, every
> dialog (wrongly) spawns x2gosuspend-session for every message the agent wants to
> show.
>
> nxagent sends a KILL SESSION dialog when close_session is executed for
> non-persistent sessions (like shadow sessions), but the default handler
> x2gosuspend-session that is set via NX_CLIENT is x2gosuspend-session, which is
> called and fails to suspend the session (since session suspension doesn't make
> sense or works with non-persistent sessions.)
>
> While the general goal should be to relay messages to the client side one day,
> currently I want a small wrapper script on the server side which handles
> server-side events in a better way.
>
> Thus retitling this bug report.

I have not tested the following, but could it work?

1. download opennx client. It brings a matching nxclient binary IIRC
2. edit /usr/bin/x2gostartagent: find the line defining NX_CLIENT and
let the varible point to opennx nxclient.

If the nxclient is not working you have two further options:
1. use nxcl from the google neatx project
2. find a copy of the original nxclient 3.x package and use the
nxclient contained within like described above.

Uli


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Thu, 26 Oct 2017 08:15:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 26 Oct 2017 08:15:02 GMT) (full text, mbox, link).


Message #22 received at 1228@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: Ulrich Sibiller <uli42@gmx.de>, 1228@bugs.x2go.org
Cc: Alexey Nemov <alexnemov@protonmail.com>
Subject: Re: [X2Go-Dev] Ctrl-Alt-T doesn't terminate connection in "local desktop" sessions
Date: Thu, 26 Oct 2017 10:13:31 +0200
[Message part 1 (text/plain, inline)]
On 10/26/2017 10:07 AM, Ulrich Sibiller wrote:
> 1. download opennx client. It brings a matching nxclient binary IIRC
> 2. edit /usr/bin/x2gostartagent: find the line defining NX_CLIENT and
> let the varible point to opennx nxclient.
>
> If the nxclient is not working you have two further options:
> 1. use nxcl from the google neatx project
> 2. find a copy of the original nxclient 3.x package and use the
> nxclient contained within like described above.
I don't think this will work.

The client must wrap around our X2Go scripts (which handle session management
via the database etc.), and we currently don't have something like this. I'll
have to implement it some day.


The workaround for the user currently is to use the buttons in X2Go Client,
which do what they are supposed to do.



Mihai

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Wed, 05 Feb 2020 08:25:01 GMT) (full text, mbox, link).


Acknowledgement sent to Kimyk <kimyk@pnu.edu>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Wed, 05 Feb 2020 08:25:02 GMT) (full text, mbox, link).


Message #27 received at 1228@bugs.x2go.org (full text, mbox, reply):

From: Kimyk <kimyk@pnu.edu>
To: 1228@bugs.x2go.org
Subject: Ref No: GFSP/ 4878/8782/2020
Date: Wed, 05 Feb 2020 17:19:37 +0900
[Message part 1 (text/plain, inline)]
Congratulations.Please confirm and verify your winningsBest Regards
[Message part 2 (text/html, inline)]
[Official Winning Notification.pdf (application/pdf, attachment)]
[Claims Verification Form.pdf (application/pdf, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Mon, 19 Apr 2021 18:30:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 19 Apr 2021 18:30:01 GMT) (full text, mbox, link).


Message #32 received at 1228@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: 1228-submitter@bugs.x2go.org
Cc: control@bugs.x2go.org, 1228@bugs.x2go.org
Subject: X2Go issue (in src:x2goserver) has been marked as pending for release
Date: Mon, 19 Apr 2021 20:28:43 +0200 (CEST)
tag #1228 pending
fixed #1228 4.1.0.4
thanks

Hi!

X2Go issue #1228 (src:x2goserver) reported by you has been
fixed in X2Go Git. You can see the changelog below, and you can
check the diff of the fix at:

    https://code.x2go.org/gitweb?p=x2goserver.git;a=commitdiff;h=51e1da1312245accbfcb6f2fa360c5bef3d99588

The issue will most likely be fixed in src:x2goserver (4.1.0.4).

light+love
X2Go Git Admin (on behalf of the sender of this mail)

---
commit 51e1da1312245accbfcb6f2fa360c5bef3d99588
Author: Ulrich Sibiller <uli42@gmx.de>
Date:   Fri Mar 12 11:48:19 2021 +0100

    x2gostartsession: let x2godialog handle events via NX_CLIENT.
    
    Previously, any action that should have displayed a dialog did instead
    suspend x2goagent, since NX_CLIENT was set to x2gosuspend-session.
    
    Fixes: #1228.
    Fixes: #1540.

diff --git a/debian/changelog b/debian/changelog
index 5fde4817..102e58c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -458,6 +458,10 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium
       Previous version was incomplete. Note that this will only work correctly
       once we actually update to 3.5.99.26 within X2Go, but it doesn't hurt to
       have the new definitions until then. Fixes: #1538.
+    - x2gostartsession: let x2godialog handle events via NX_CLIENT.
+      Previously, any action that should have displayed a dialog did instead
+      suspend x2goagent, since NX_CLIENT was set to x2gosuspend-session.
+      Fixes: #1228. Fixes: #1540.
 
  -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de>  Fri, 19 Jul 2019 20:55:11 +0200
 


Added tag(s) pending. Request was from Mihai Moldovan <ionic@ionic.de> to control@bugs.x2go.org. (Mon, 19 Apr 2021 18:30:02 GMT) (full text, mbox, link).


Marked as fixed in versions 4.1.0.4. Request was from Mihai Moldovan <ionic@ionic.de> to control@bugs.x2go.org. (Mon, 19 Apr 2021 18:30:02 GMT) (full text, mbox, link).


Message sent on to Alexey Nemov <alexnemov@protonmail.com>:
Bug#1228. (Mon, 19 Apr 2021 18:30:02 GMT) (full text, mbox, link).


Removed tag(s) pending. Request was from Mihai Moldovan <ionic@ionic.de> to control@bugs.x2go.org. (Mon, 19 Apr 2021 18:40:01 GMT) (full text, mbox, link).


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1228; Package x2goserver. (Mon, 19 Apr 2021 19:15:01 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>, 1228@bugs.x2go.org:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 19 Apr 2021 19:15:02 GMT) (full text, mbox, link).


Message #46 received at 1228@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: 1228@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1228: X2Go issue (in src:x2goserver) has been marked as pending for release
Date: Mon, 19 Apr 2021 21:13:37 +0200
[Message part 1 (text/plain, inline)]
Control: notfixed -1 4.1.0.4

* On 4/19/21 8:28 PM, Mihai Moldovan wrote:
> tag #1228 pending
> fixed #1228 4.1.0.4
> thanks

Sorry for the noise, this should have not made it to the master branch yet.

It requires nx-libs to be updated first and a round of cleanup in the commits.


It'll eventually be pushed correctly, but not just now.



Mihai

[OpenPGP_signature (application/pgp-signature, attachment)]

No longer marked as fixed in versions 4.1.0.4. Request was from Mihai Moldovan <ionic@ionic.de> to 1228-submit@bugs.x2go.org. (Mon, 19 Apr 2021 19:15:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Wed Dec 7 00:12:14 2022; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.