diff --git a/0001-Unset-QT_QPA_PLATFORM-to-get-xcb.patch b/0001-Unset-QT_QPA_PLATFORM-to-get-xcb.patch new file mode 100644 index 0000000..9f0f535 --- /dev/null +++ b/0001-Unset-QT_QPA_PLATFORM-to-get-xcb.patch @@ -0,0 +1,31 @@ +From 42b0b5adb9154519a2eda7da81a993c17a536f0a Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Sat, 17 Mar 2018 17:02:39 +0100 +Subject: [PATCH] Unset QT_QPA_PLATFORM to get xcb + +Currently we can't get wayland applications to work, as they rely on +XDG_RUNTIME_DIR being set. +With wayland 1.15, WAYLAND_DISPLAY can be an absolute path though, so this +can be replaced by setting WAYLAND_DISPLAY=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY +before unsetting XDG_RUNTIME_DIR and removing the unsetenv of QT_QPA_PLATFORM. +--- + src/kdesu_stub.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/kdesu_stub.c b/src/kdesu_stub.c +index 49db577..5038628 100644 +--- a/src/kdesu_stub.c ++++ b/src/kdesu_stub.c +@@ -315,6 +315,9 @@ int main() + /* Handle display */ + + if (strcmp(params[P_DISPLAY].value, "no")) { ++ /* We only handle X11 - so unset QT_QPA_PLATFORM to get xcb. */ ++ unsetenv("QT_QPA_PLATFORM"); ++ + xsetenv("DISPLAY", params[P_DISPLAY].value); + if (params[P_DISPLAY_AUTH].value[0]) { + int fd2; +-- +2.16.2 + diff --git a/kdesu.changes b/kdesu.changes index 30a8192..06a16e7 100644 --- a/kdesu.changes +++ b/kdesu.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 19 09:59:40 UTC 2018 - fabian@ritter-vogt.de + +- Add patch to allow kdesu to be used on wayland: + * 0001-Unset-QT_QPA_PLATFORM-to-get-xcb.patch + ------------------------------------------------------------------- Mon Mar 12 23:29:41 CET 2018 - lbeltrame@kde.org diff --git a/kdesu.spec b/kdesu.spec index c58d9ba..8d61925 100644 --- a/kdesu.spec +++ b/kdesu.spec @@ -45,6 +45,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-% Source1: baselibs.conf # PATCH-FIX-OPENSUSE fpie.patch -- make kdesud compile/link with -(f)pie flags Patch0: fpie.patch +# PATCH-FIX-OPENSUSE +Patch1: 0001-Unset-QT_QPA_PLATFORM-to-get-xcb.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -86,7 +88,7 @@ Development files. %lang_package -n %lname %prep %setup -q -%patch0 -p1 +%autopatch -p1 %build %cmake_kf5 -d build