diff --git a/krfb/main.cpp b/krfb/main.cpp --- a/krfb/main.cpp +++ b/krfb/main.cpp @@ -42,6 +42,16 @@ static bool checkX11Capabilities() { + if (QApplication::platformName() != QStringLiteral("xcb")) { + // XTestQueryExtension segfaults under wayland + XWayland. + // exit early and gracefully + KMessageBox::error(nullptr, + i18n("Desktop Sharing is not running under an X11 Server. " + "Other display servers are currently not supported."), + i18n("Desktop Sharing Error")); + return false; + } + int bp1, bp2, majorv, minorv; Bool r = XTestQueryExtension(QX11Info::display(), &bp1, &bp2, &majorv, &minorv);