qubist
March 27, 2026, 11:46am
1
Hi,
Looking at the code of /usr/bin/qubes-run-terminal, I notice that it is possible to set default terminal through environment variable TERMINAL. I set that to xterm in .bashrc and it works fine as long as I run qubes-run-terminal directly, e.g. through another terminal window.
However, whenever I try to “Run terminal” from qui-domains, it launches xfce4-terminal, not what is set in TERMINAL.
What is the reason for that and how to make it work as expected?
barto
March 27, 2026, 3:22pm
2
I think this has been discussed before, see this thread:
At least in its Feb 18 incarnation, /usr/bin/qubes-run-terminal has this order hard-coded (regardless of any environment variables):
x-terminal-emulator
ptyxis
gnome-terminal
kgx
then a list of “xfce4-terminal konsole urxvt rxvt termit terminator Eterm aterm roxterm termite lxterminal mate-terminal terminology st xterm”
So… hard-coded.
It is a Bash script, you can read it too.
Maybe the solution is to change the “alternatives” (in the template) of x-terminal-emulator to point to gno…
1 Like
barto
March 27, 2026, 3:25pm
3
And… on Fedora-based qubes, you have “alternatives” to fiddle with the defaults. Also covered in the thread linked above.
qubist
March 27, 2026, 4:34pm
4
Thanks for the feedback.
I wonder if this is a bug.
Atrate
March 27, 2026, 9:58pm
5
My solution is to simply symlink the terminal binary that I prefer to /usr/bin/gnome-terminal. Is that a clean solution? No, not really, but as long as you don’t use the GNOME templates, you should be fine.
Atrate
March 27, 2026, 9:58pm
6
qubist:
Looking at the code of /usr/bin/qubes-run-terminal, I notice that it is possible to set default terminal through environment variable TERMINAL. I set that to xterm in .bashrc and it works fine as long as I run qubes-run-terminal directly, e.g. through another terminal window.
However, whenever I try to “Run terminal” from qui-domains, it launches xfce4-terminal, not what is set in TERMINAL.
Setting it in .bashrc only applies to shells launched by user user. If you set it in /etc/environment in the template it may work.
2 Likes
Or if you want to set it in an individual AppVM, use ~/.config/environment.d/*.conf or /usr/local/lib/environment.d/*.conf
https://www.freedesktop.org/software/systemd/man/latest/environment.d.html
1 Like
qubist
March 28, 2026, 7:42am
8
I added in template:
# cat /etc/environment.d/99-terminal.conf
export TERMINAL=xterm
but it seems to have no effect. TERMINAL does not show in printenv in AppVMs.
qubist
March 28, 2026, 10:25am
10
Without export
I tried that first. Then with it. - Same.
Atrate
March 28, 2026, 10:40am
11
Try putting it in the /etc/environment file like
TERMINAL=xterm
Odd. Works for me (after restarting the AppVM)
qubist
March 28, 2026, 12:00pm
13
@rustybird
Odd. Works for me (after restarting the AppVM)
What template? I am testing on debian-13-xfce.
@Atrate
What you suggested works. But why doesn’t /etc/environment/*.conf?
Same.
Maybe try it with a freshly installed, unmodified fedora-43-xfce-4.3.0-202601041226 and a new AppVM?
Double check that it’s /etc/environment.d /*.conf
qubist
March 28, 2026, 12:32pm
15
Double double checked.
This worked:
# cat /etc/profile.d/default-terminal.sh
export TERMINAL=xterm