2018-03-27 22:19:00 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Try to find a terminal emulator that's installed and run it.
|
|
|
|
|
2020-01-23 11:47:19 +01:00
|
|
|
is_command() {
|
2018-08-28 03:25:12 +02:00
|
|
|
# bogus warning from ShellCheck < 0.5.0
|
|
|
|
# shellcheck disable=SC2039
|
2020-01-23 11:47:19 +01:00
|
|
|
type "$1" >/dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
|
|
|
if is_command x-terminal-emulator; then
|
|
|
|
exec x-terminal-emulator
|
|
|
|
fi
|
|
|
|
|
|
|
|
if is_command gnome-terminal; then
|
2020-01-27 12:11:48 +01:00
|
|
|
exec qubes-run-gnome-terminal
|
2020-01-23 11:47:19 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
for terminal in xfce4-terminal konsole urxvt rxvt termit terminator Eterm aterm roxterm termite lxterminal mate-terminal terminology st xterm; do
|
|
|
|
if is_command "$terminal" ; then
|
2018-03-27 22:19:00 +02:00
|
|
|
exec "$terminal"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2018-08-28 03:25:12 +02:00
|
|
|
echo "ERROR: No suitable terminal found." >&2
|