quickemu-project / quickgui

An elegant virtual machine manager for the desktop
MIT License
993 stars 78 forks source link

feat: improve terminal support #142

Open flexiondotorg opened 4 months ago

flexiondotorg commented 4 months ago

There are two options:

Terminal enumeration

Quickgui should support discovering more terminals and make an effort to launch the user's preferred terminal when connecting to VMs via SSH. This should work on Linux and macOS.

Current Quickgui will evaluate x-terminal-emulator (specific to Debian and Ubuntu) and fallback to hunting the PATH for a supported terminal.

This reply to the How to set Blackbox as default terminal emulator question on the Nix Discourse is the best summary of the situation regarding a standardised way of expressing a terminal preference:

Until the Terminal intent specification 65 is accepted and widely implemented, there is not really a meaningful way to set up default terminal emulator.

In GNOME 44, GLib gained the ability to run xdg-terminal-exec 38, which despite the name is not actually standardized 9. You could package xdg-terminal-exec or just create xdg-terminal-exec as a symlink to blackbox and add that to PATH.

But that mostly just affects what terminal emulator will terminal programs run in. It will not affect for example Nautilus, which has Console hardcoded 14. You will also want GitHub - Stunkymonkey/nautilus-open-any-terminal 61.

nautilus_open_any_terminal.py has comprehensive terminal support to use as reference.

Bundle a terminal

Alternatively, we ship a simple terminal in Quickgui that uses https://pub.dev/packages/xterm. I prefer this option, and it might help with improve SSH support: https://github.com/TerminalStudio/xterm.dart/blob/master/example/lib/ssh.dart