From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> If XDG_SESSION_TYPE is not set, then $XDG_SESSION_TYPE will become nothing, which means the test: if [ $XDG_SESSION_TYPE = "wayland" ]; turns into if [ = "wayland" ]; And will cause a shell error. Adding quotes around "$XDG_SESSION_TYPE" changes an empty $XDG_SESSION_TYPE into: if [ "" = "wayland" ]; which the shell can understand. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204261 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 ee839a26..2477045f 100755 --- a/kernel-shark/bin/kshark-su-record +++ b/kernel-shark/bin/kshark-su-record @@ -1,6 +1,6 @@ #!/bin/bash -if [ $XDG_SESSION_TYPE = "wayland" ] +if [ "$XDG_SESSION_TYPE" = "wayland" ] then xhost +si:localuser:root &>/dev/null fi -- 2.20.1
![]() |