Recently, the terminal started from my Fedora 41 qubes changed from gnome-terminal to Terminal. I don’t really care about my terminal emulator usually, but the new one has horrible performance on Qubes OS.
Is it possible to configure which terminal is started when using “run terminal” from the qube manager systray?
The priority and precedence of Terminal emulators is decided within /usr/bin/qubes-run-terminal executable. Which is a part of qubes-core-agent-linux repository.
Recently there were two changes to it to change the order of lookup for installed Terminal emulators. I was personally responsible for ptyxis having more priority than gnome-terminal. Since it is inline with upstream Fedora and GNOME policies. The 2nd change happened during the most recent update.
You can override the lookup behavior by defining your desired $TERMINAL environment variable in the AppVM or TemplateVM.
@ben-grande The above is related to the recent patch to qubes-run-terminal. I can confirm that it does not honor the $TERMINAL environment variable if run via qubes.StartApp service?
Yes. But it should be possible to override it with “$TERMINAL” environment variable. And it does not work.
It is possible to hammer and chisel our ways by manually editing that script or removing unwanted Terminal Emulators from the TemplateVM. But there should be the better solution and the “$TERMINAL” should work.
I believe that this is indeed a good feature to develop. The qube could query dom0 via qubesdb for a feature such as terminal-preference which could have the value of choice1 choice2 choice3 ... and override the default ones.
And if it is there, discover why a terminal is being used:
printf '%s\n' "t=$TERMINAL"
sh -x "$(command -v qubes-run-terminal)"
Note variables of profiles are only considered when a login happen, same on systemd, only when it starts.
The gnome-terminal doesn’t seem to be available on fedora-41:
command -v gnome-terminal; echo $?
Is this a question?
Works for me^TM.
An easy way to check if the variable is being set is by modifying the beginning of the script with this (will work when zenity is available, else, redirect variable to a temp file):
#!/bin/sh
set -eu
text="TERMINAL=${TERMINAL-}"
printf '%s\n' "$text" | tee -- /tmp/log
if command -v zenity >/dev/null; then
zenity --info --text "$text"
fi
exit