Message ID | 20190723225238.859019956@goodmis.org (mailing list archive) |
---|---|
State | Accepted |
Commit | b084eb5aa86ab8d70cb0e421c68313ae4db83015 |
Headers | show |
Series | kernel-shark: Be more careful with kshark-su-record | expand |
On 24.07.19 г. 1:50 ч., Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org> > > 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@goodmis.org> > --- > 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@gmail.com>
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