Message ID | 20181016155232.5257-23-ykaradzhov@vmware.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | Add Qt-based GUI for KernelShark | expand |
diff --git a/kernel-shark-qt/bin/kshark-su-record b/kernel-shark-qt/bin/kshark-su-record new file mode 100755 index 0000000..ee839a2 --- /dev/null +++ b/kernel-shark-qt/bin/kshark-su-record @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ $XDG_SESSION_TYPE = "wayland" ] +then + xhost +si:localuser:root &>/dev/null +fi + +pkexec kshark-record -o ${PWD}/trace.dat diff --git a/kernel-shark-qt/src/CMakeLists.txt b/kernel-shark-qt/src/CMakeLists.txt index 2592094..ef0aa71 100644 --- a/kernel-shark-qt/src/CMakeLists.txt +++ b/kernel-shark-qt/src/CMakeLists.txt @@ -83,6 +83,9 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND) install(FILES "${KS_DIR}/org.freedesktop.kshark-record.policy" DESTINATION /usr/share/polkit-1/actions/) + install(PROGRAMS "${KS_DIR}/bin/kshark-su-record" + DESTINATION /usr/local/bin/) + endif (Qt5Widgets_FOUND AND Qt5Network_FOUND) add_subdirectory(plugins)