Re: [PATCH 2/2] kernel-shark: Set the DISPLAY environment for pkexec kshark-record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 24.07.19 г. 1:50 ч., Steven Rostedt wrote:
From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

When running a fresh install, I hit this:

  ERROR:  Capture process failed:
  Unknown errorqt.qpa.screen: QXcbConnection: Could not connect to display
  Could not connect to any X display.

This was due to pkexec not saving the DISPLAY environment variable. To solve
this, pass that variable as one of the environment variables to pkexec.

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
  kernel-shark/bin/kshark-su-record | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index 7faff1cb3339..8c9fbd02a351 100755
--- a/kernel-shark/bin/kshark-su-record
+++ b/kernel-shark/bin/kshark-su-record
@@ -6,4 +6,4 @@ then
  fi
THIS_DIR=`dirname $0`
-pkexec ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat
+pkexec env DISPLAY=${DISPLAY} ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat



Both patches look good to me.
Thanks!
Yordan

Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux