"Run terminal" does not run TERMINAL

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?

I think this has been discussed before, see this thread:

1 Like

And… on Fedora-based qubes, you have “alternatives” to fiddle with the defaults. Also covered in the thread linked above.

Thanks for the feedback.
I wonder if this is a bug.

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.

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

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.

Without export

Without export

I tried that first. Then with it. - Same.

Try putting it in the /etc/environment file like

TERMINAL=xterm

Odd. Works for me (after restarting the AppVM)

@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

Double double checked.

This worked:

# cat /etc/profile.d/default-terminal.sh 
export TERMINAL=xterm