common, qemu: Add support for konsole terminal emulator
Make's `run` target for QEMU already has support for gnome-terminal.
This change adds support for konsole which is the default terminal
emulator for the KDE desktop environment.
This already includes the correct `-e` flag for Konsole.
Signed-off-by: César Pastorini <cesar.pastorini@gmail.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/common.mk b/common.mk
index 8fa8cca..9299a86 100644
--- a/common.mk
+++ b/common.mk
@@ -492,6 +492,7 @@
endef
else
gnome-terminal := $(shell command -v gnome-terminal 2>/dev/null)
+konsole := $(shell command -v konsole 2>/dev/null)
xterm := $(shell command -v xterm 2>/dev/null)
ifdef gnome-terminal
define launch-terminal
@@ -499,13 +500,20 @@
$(gnome-terminal) -t $(2) -x $(BUILD_PATH)/soc_term.py $(1) &
endef
else
+ifdef konsole
+define launch-terminal
+ @nc -z 127.0.0.1 $(1) || \
+ $(konsole) --new-tab -p tabtitle=$(2) -e $(BUILD_PATH)/soc_term.py $(1) &
+endef
+else
ifdef xterm
define launch-terminal
@nc -z 127.0.0.1 $(1) || \
$(xterm) -title $(2) -e $(BASH) -c "$(BUILD_PATH)/soc_term.py $(1)" &
endef
else
-check-terminal := @echo "Error: could not find gnome-terminal nor xterm" ; false
+check-terminal := @echo "Error: could not find gnome-terminal, konsole nor xterm" ; false
+endif
endif
endif
endif