diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-07-23 18:50:46 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-07-24 08:02:44 -0400 |
commit | b084eb5aa86ab8d70cb0e421c68313ae4db83015 (patch) | |
tree | b13bfb9f3c958484f1b60a74b14dd376376a3396 | |
parent | 8eb0d753e658446b584b367a45edbc4884ec8bb5 (diff) | |
download | trace-cmd-b084eb5aa86ab8d70cb0e421c68313ae4db83015.tar.gz |
kernel-shark: Set the DISPLAY environment for pkexec kshark-record
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.
Link: http://lore.kernel.org/linux-trace-devel/20190723225238.859019956@goodmis.org
Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rwxr-xr-x | kernel-shark/bin/kshark-su-record | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record index 7faff1cb..8c9fbd02 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 |