kernel-shark-qt: Workaround for running as Root on Wayland

The Record dialog requires Root privileges in order to be able to collect
tracing data. However graphical applications cannot be run as root on
Wayland. The problem is worked around by wrapping the kshark-record
executable in a shell script which checks the XDG_SESSION_TYPE and in
the case of Wayland, allows the root user to access the running
X server.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2 files changed