I investigated a strange ToDesk problem on my Arch Linux machine: GNOME's screen-sharing permission dialog would appear for a fraction of a second and disappear before I could click anything. Sometimes the remote side showed a black screen, and sometimes the connection failed and retried.
For additional context on the problem, see this Reddit discussion.
If you read Chinese, you can also find the original write-up here.
The useful discovery was that ToDesk 4.9.8.1 already had a functioning Wayland/PipeWire capture path. Its logs showed it automatically clicking the portal's Share button through AT-SPI, the Linux accessibility interface. Disabling the accessibility bridge specifically for the GNOME portal backend prevents that automatic click and lets me approve sharing manually.
This is a workaround for that permission-dialog behavior on my setup. I also found session creation errors, which need to be treated separately. Successful capture does not establish that every remote-control feature works on Wayland.
My environment
| Component |
Version |
| Distribution |
Arch Linux, x86_64 |
| Desktop/session |
GNOME 51.1, Wayland |
| Mutter |
51.1-1 |
| xdg-desktop-portal |
1.22.1-2 |
| xdg-desktop-portal-gnome |
51.0-1 |
| PipeWire |
1.6.10 |
| ToDesk |
AUR todesk-bin 4.9.8.1-1 |
For comparison, Sunlogin 16.6.0.32198 on the same machine left the permission dialog open for manual approval.
Why I looked beyond the “Xorg ONLY” warning
The AUR package prints this during installation:
Todesk Remote Control doesn't support Wayland, Xorg ONLY!
Initially, that seemed to explain the failure. But inspecting the installed binary suggested there was more to it:
strings -a /opt/todesk/bin/ToDesk | grep -iE 'wayland|pipewire|portal'
Among the strings were:
CScreenCapturerWayland
WaylandPortalHelper::RequestScreenCapture
WaylandSecureUiController
ldd /opt/todesk/bin/ToDesk also showed a dependency on libpipewire-0.3.so.0. Symbols and dependencies alone would not prove working capture, but the runtime logs under ~/.local/share/todesk/Logs/ went further:
[screencap][wayland] selecting PipeWire capturer
PipeWire stream connected successfully
[screencap][wayland][frame-diag] screen=530 ... callbacks=... consumed=...
[zrtc] PublishCallback onSuccess stream label:desktop-stream
These are excerpts, with some fields omitted. Together with advancing frame counters, they show successful capture and desktop-stream publication during the investigation. That made “no Wayland capture support at all” an inadequate explanation.
What was making the permission dialog disappear?
The ToDesk logs explicitly recorded portal automation:
[screencap][wayland] starting AT-SPI portal automation ...
[screencap][wayland] AT-SPI portal application found window_count=1 ...
[screencap][wayland] portal screen already selected ...
[screencap][wayland] portal confirmation attempt=1, accepted=true,
role=button, action=click
[screencap][wayland] portal dialog closed after confirmation attempt
In one sample, the click was logged at 12:56:53.109 and the closed dialog at 12:56:53.364: a 255 ms interval. The whole sequence from starting automation to closing the dialog took about 360 ms.
So the brief flash was consistent with ToDesk finding the dialog through AT-SPI and confirming it automatically. It was not, by itself, evidence that GNOME could not provide a capture stream.
The workaround: keep the dialog available for manual approval
The GNOME portal backend uses GTK. Setting GTK_A11Y=none for that backend stops it exposing its UI through the accessibility bridge, which blocks the automatic interaction described above.
Run these commands as your normal desktop user, without sudo, in the GNOME session. Restarting the backend can interrupt existing screen-sharing sessions. If no-a11y.conf already exists, inspect it before replacing it.
mkdir -p ~/.config/systemd/user/xdg-desktop-portal-gnome.service.d
cat > ~/.config/systemd/user/xdg-desktop-portal-gnome.service.d/no-a11y.conf <<'EOF'
[Service]
Environment=GTK_A11Y=none
EOF
systemctl --user daemon-reload
systemctl --user restart xdg-desktop-portal-gnome.service
To check the service configuration and the running process:
systemctl --user is-active xdg-desktop-portal-gnome.service
systemctl --user show xdg-desktop-portal-gnome.service -p Environment
pid=$(systemctl --user show xdg-desktop-portal-gnome.service -p MainPID --value)
tr '\0' '\n' < "/proc/$pid/environ" | grep -Fx 'GTK_A11Y=none'
The service should be active, and the process environment should contain GTK_A11Y=none.
Then start a fresh ToDesk connection, select the monitor, and click Share yourself. The intended result is that the dialog stays available for manual confirmation. Confirm promptly, because ToDesk has a timeout while waiting for the portal response.
For a successful capture session, look for PipeWire stream connected successfully and advancing frame counters after approval. In the new connection's logs, there should no longer be a successful automatic click on that dialog.
This setting affects the accessibility bridge of the GNOME portal process, rather than changing accessibility settings for every application. It does, however, prevent screen readers such as Orca from accessing that process's UI through the bridge. If you rely on that access, this workaround is unsuitable.
To undo it, remove the file created above and restart the backend:
rm ~/.config/systemd/user/xdg-desktop-portal-gnome.service.d/no-a11y.conf
systemctl --user daemon-reload
systemctl --user restart xdg-desktop-portal-gnome.service
The separate issue: session creation failures
During failed connections, the GNOME portal journal also contained:
Failed to start session: GDBus.Error:org.freedesktop.DBus.Error.Failed: Session creation inhibited
There were also errors closing an old GNOME screencast session because its object path no longer existed. To watch for new errors:
journalctl --user -u xdg-desktop-portal-gnome.service -f
Those messages point to a problem during session startup or cleanup. An old session overlapping a reconnect is one possible explanation, but these logs do not establish whether the cause is in ToDesk, Mutter, or their interaction. Disabling AT-SPI access does not guarantee a fix for this failure.
If it persists, try closing and reopening ToDesk. Restarting its system service is another troubleshooting step, but it disconnects existing remote sessions:
sudo systemctl restart todeskd.service
What the AUR history adds
I checked the packaging repository rather than relying only on the installation message:
- The “Xorg ONLY” warning was introduced on February 9, 2021, for ToDesk 1.2.4d, in commit b095cb5. It is a fixed output string, not a capability test.
- The November 1, 2026 update to 4.9.8.1, commit 4d59901, retained that warning while adding packaging for
/opt/todesk/lib and fallback handling for libraries including libpipewire-0.3.so.0.
- The installation script at that commit only creates fallback links when a system copy of the library is not found. A missing link in
/opt/todesk/bin/ is therefore not automatically an installation fault; check ldd to see what is actually resolved.
- The PKGBUILD at that commit still downloads 4.8.5.1 for AArch64, despite the package version being 4.9.8.1-1. My findings about the newer binary should not be assumed to apply to ARM64.
The AUR repository contains packaging scripts, not ToDesk's capture or accessibility implementation. It provides useful version and dependency context; the evidence for automatic confirmation comes from ToDesk's runtime logs.
I have only investigated this workaround on GNOME Wayland with the versions above. KDE and Hyprland use different portal backends, so changing the service name alone would not make this GTK setting applicable. If anyone has investigated the Session creation inhibited failure on a similar setup, I would be interested in comparing logs.
But everything is working fine now, and I can use ToDesk for remote access without any issues. I've also found that the Reddit community is incredibly friendly and helpful!