0

Frequently this scenario happens when I'm logged in in more than one X session on the same machine, for example locally (:0.0) and remotely through RDP.

If a desktop application (like the Chrome browser, I suspect it's GTK in general) opens a dialog window, for example to save a file, the dialog window often appears on the other X session. Which is obviously hard to access at the moment. The application then seems like frozen until the dialog is dealt with at the other X session.

What's even worse is that sometimes the dialog apparently "opens" on an X session that isn't accessible any more, such as closed RDP session. Then it's not possible to access it at all and and the only solution is to forcibly kill the application.

So I'm looking for ways how to:

  • Debug the issue - why it's happening in the first place.
  • Prevent it from happening.

(Another possible solution/workaround would be to avoid creating multiple sessions at all, if that'd be possible (Can an xrdp server be configured to connect to an existing desktop session?).)


I suspect this might be related to systemd login sessions being stuck somehow (and then maybe causing some troubles over dbus):

$ loginctl list-sessions
SESSION  UID USER    SEAT  TTY  STATE   IDLE SINCE
   3602 2001 user    -     -    closing no   -
    c11 2001 user    -     -    closing no   -
     c7 2001 p       seat0 tty7 closing no   -
...

And subsequently misbehaving

1 Answer 1

1

This is probably due to all systemd sessions by the same user sharing a single dbus. See the xrdp wiki:

Why can't I log the same user on ... the graphical console and over xrdp at the same time?

... On systemd-based systems, multiple sessions for the same user share a single instance of the session D-Bus. This allows systemd to support long-lived services for the user, but causes confusion for desktop services which are not expecting to be shared.

This has been raised with systemd [see issue], but a possible solution has been rejected.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.