From d35db6d97310564c042b0b0684ef526b6bec98ad Mon Sep 17 00:00:00 2001 From: 6peng <6peng@proton.me> Date: Sat, 23 Apr 2022 19:29:19 +0800 Subject: [PATCH] fix cannot open display --- lshw-B.02.18-add-localuser-root-to-helper.patch | 11 +++++++++++ lshw.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lshw-B.02.18-add-localuser-root-to-helper.patch diff --git a/lshw-B.02.18-add-localuser-root-to-helper.patch b/lshw-B.02.18-add-localuser-root-to-helper.patch new file mode 100644 index 0000000..ca37b1d --- /dev/null +++ b/lshw-B.02.18-add-localuser-root-to-helper.patch @@ -0,0 +1,11 @@ +diff -urN lshw-B.02.18.orig/src/gui/integration/lshw-gui.in lshw-B.02.18/src/gui/integration/lshw-gui.in +--- lshw-B.02.18.orig/src/gui/integration/lshw-gui.in 2022-04-23 19:14:19.634150743 +0800 ++++ lshw-B.02.18/src/gui/integration/lshw-gui.in 2022-04-23 19:15:38.485238780 +0800 +@@ -1,5 +1,7 @@ + #! /bin/bash + ++xhost +si:localuser:root + /usr/bin/pkexec @CMAKE_INSTALL_FULL_SBINDIR@/gtk-lshw ++xhost -si:localuser:root + + diff --git a/lshw.spec b/lshw.spec index ae21b84..82056aa 100644 --- a/lshw.spec +++ b/lshw.spec @@ -1,6 +1,6 @@ Name: lshw Version: B.02.18 -Release: 21 +Release: 21.1 Summary: Hardware lister License: GPLv2 URL: http://ezix.org/project/wiki/HardwareLiSter @@ -9,6 +9,7 @@ Patch0: lshw-B.02.18-scandir.patch Patch1: lshw-B.02.18-20cda77.patch Patch2: lshw-B.02.18-revert-json.patch Patch3: lshw-B.02.18-cmake.patch +Patch4: lshw-B.02.18-add-localuser-root-to-helper.patch BuildRequires: gcc gcc-c++ cmake gettext BuildRequires: desktop-file-utils libappstream-glib ninja-build @@ -38,6 +39,7 @@ The %{name}-help package contains doc files for %{name}. %patch01 -p1 %patch02 -R -p1 %patch03 -p1 +%patch04 -p1 %build mkdir -p build && cd build @@ -74,6 +76,9 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \ %{_mandir}/man1/lshw.1.gz %changelog +* Sat Apr 23 2022 6peng <6peng@proton.me> - B.02.18-21.1 +- Add/Remove xhost +si:localuser:root to the launchar + * Fri Feb 14 2020 chengquan - B.02.18-21 - Rollback some patches for bugfix -- Gitee