The default terminal when launching terminal based applications is uxterm. I would like this to be xfce4-terminal. This is not the same issue as “how do I set my default keybinding to open xfce4-terminal”. I have tried to parse multiple arch wiki and other pages on how to set default applications with xdg-open, mimetypes, etc. I am lost!
Setup
My ~/.config/i3/config file is configured so that mod+Enter opens xfce4-terminal.
After default installation the result of echo $TERM was xterm-color
I have since set the TERM variable in my .bashrc file to “xfce4-terminal”
Echo $TERM results in “xfce4-terminal”
Expected / desired behaviour:
mod+d to open my rofi applications launcher and selecting htop, ranger or other terminal based applications should launch these applications in xfce4-terminal
Current behaviour:
mod+d and selecting htop or ranger results in the application being launched in uxterm.
Additional notes
If I can get help with this, I can make sure I set my default applications (sometimes links from TUI apps open in firefox and not brave for example).
Would be good to get a best practice on this, i.e. should these variables/defaults be controlled in the user (home) rectory, or globally?
This post seems to have some help. But I’d prefer to set this up in a standard linux way, rather than the YAD settings, unless this is the only way in EOS?
This is expected. This variable is not what you think. Read Archwiki - Environment variables for more.
There is only an unofficial/frequently used var for the default terminal: TERMINAL
But each rc provider for WM/custom keybindings configuration will set terminal differently.
Most of them hardcode terminal app, others use $TERMINAL exporting this var in ~/.profile.
You should look in i3 config to confirm how those keybindings work.
It tries to start one of the following (in that order):
•$TERMINAL (this is a non-standard variable)
•x-terminal-emulator (only present on Debian and derivatives)
•mate-terminal
•gnome-terminal
•terminator
•xfce4-terminal
•urxvt
•rxvt
•termit
•Eterm
•aterm
•uxterm
•xterm
•roxterm
•termite
•lxterminal
•terminology
•st
•qterminal
•lilyterm
•tilix
•terminix
•konsole
•kitty
•guake
•tilda
•alacritty
•hyper
Please don’t complain about the order: If the user has any preference, they will have $TERMINAL set or modified their i3 configuration file.
Possible solutions:
Try using the TERMINAL variable instead if TERM.
Remove uxterm so that the applications default to only xfce4-terminal.
I am not sure what this refers to, but the .desktop idea is one more of the possible solutions. Using env var $TERMINAL is one and explained very well by @Erreffel1 .
EnOS or any distro, can
provide a script default-terminal file in /usr/bin/, with a random/distro preferred terminal (example content: alacritty "$@")
provide a default-terminal.desktop file, installing it in /usr/share/applications/, with Exec=default-terminal).
Then using those in all provided config-skel files (using appropriately)
A simple script/app could change user’s default terminal setting, just symlinking in ~/.local/share/applications/ to whatever preferred terminal is chosen (from a list of installed at the time?).
I have been using this technic for some time with prime-run , since my desktop has Intel and a 390/fermi nvidia card. No xorg.conf files exist. Everything runs on Intel and when an app needs more, I use prime-run <appname>. (using DRI-PRIME=1 creates a parsing mess in several cases)
we do only have xfce4-terminal in the configs for the two themed installs xfce4 and i3 and yea we do not change terminal for p.e. GNOME or Plasma or Mate e.t.c they us the default one from default configs we got from arch repo…
Maybe you could create some wrapper for rofi the same way it is possible for dmenu?
Here is an example dmenu_recent. For the first time you run a software you need to specify if it should run in terminal or in background as a standalone application.
Or make use of *.desktop files or run custom scripts from you ~/.local/bin that is just a custom start script for specific softwares.
Wow thanks everyone, I’ve been super busy and haven’t had a chance to check the forum. I appreciate all the replies and will update you once I’ve tried them.
$TERMINAL - I had seen some info to this effect
i3-sensible-terminal - also had seen some info to this effect, I’ll review the man page and figure out how to prioritize terminals
Overall I do think it has to do with dmenu / .desktop files, so I’ll investigate that as well.
# bind program to workspace and focus to them on startup:
assign [class="Xfce4-terminal"] $ws1
assign [class="(?i)firefox"] $ws2
assign [class="Thunar"] $ws3
assign [class="Thunderbird"] $ws4
assign [class="TelegramDesktop"] $ws5