Prevent dialog windows from opening on a different X server
0
votes
1
answer
43
views
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 (https://unix.stackexchange.com/questions/780441/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
Asked by Petr
(1776 rep)
Jan 29, 2025, 10:18 AM
Last activity: Jan 29, 2025, 05:42 PM
Last activity: Jan 29, 2025, 05:42 PM