qubes-run-terminal 611 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. # Try to find a terminal emulator that's installed and run it.
  3. is_command() {
  4. # bogus warning from ShellCheck < 0.5.0
  5. # shellcheck disable=SC2039
  6. type "$1" >/dev/null 2>&1
  7. }
  8. if is_command x-terminal-emulator; then
  9. exec x-terminal-emulator
  10. fi
  11. if is_command gnome-terminal; then
  12. exec qubes-run-gnome-terminal
  13. fi
  14. for terminal in xfce4-terminal konsole urxvt rxvt termit terminator Eterm aterm roxterm termite lxterminal mate-terminal terminology st xterm; do
  15. if is_command "$terminal" ; then
  16. exec "$terminal"
  17. fi
  18. done
  19. echo "ERROR: No suitable terminal found." >&2