Bug: Linux client repeatedly opens GNOME Remote Desktop permission dialogs and ignores restore_token
We are experiencing an issue with the ScreenConnect Java client on GNOME Wayland.
Every time the Viewer starts, GNOME displays the "Remote Desktop / Allow remote access" permission dialog approximately 8 times before the Viewer becomes usable.
This does not happen on KDE Plasma Wayland.
After tracing the XDG Desktop Portal D-Bus communication, it appears that the client repeatedly creates and immediately destroys RemoteDesktop/ScreenCast portal sessions instead of reusing an existing session.
The observed sequence is:
CreateSession SelectSources SelectDevices (types=3, persist_mode=2) Start OpenPipeWireRemote NotifyKeyboardKeysym Close
Immediately afterwards, the client creates a completely new session and repeats the same sequence.
The trace shows that:
-
the client requests persistent access (
persist_mode=2) -
GNOME returns a valid
restore_token -
the client never supplies this
restore_tokenwhen creating the next session - instead, it creates another new portal session
As a result, GNOME correctly treats every session as a new permission request and displays another authorization dialog.
Additionally, each session only sends a single NotifyKeyboardKeysym event before being closed (for example Shift_L, Control_L, etc.), suggesting that the repeated sessions are triggered during keyboard initialization.
Example:
SelectDevices types = 3 persist_mode = 2 Response: restore_token = "xxxxxxx" Next session: SelectDevices types = 3 persist_mode = 2 (no restore_token supplied)
The portal logs also show that each session is immediately closed after a single keyboard notification:
NotifyKeyboardKeysym Session.Close CreateSession ... NotifyKeyboardKeysym Session.Close
This appears to be a client-side issue rather than a GNOME Portal issue, as the portal behaves correctly and returns a valid restore token every time.
Could you please verify whether the Linux client is expected to reuse the returned restore_token or keep a single RemoteDesktop session alive instead of creating multiple new sessions during initialization?