Terminal application ran from desktop shortcut always starts xterm instead of my default terminal emulator

When I ran htop or micro from an app launcher, such as rofi, theses terminal apps are displayed in a minuscule font that looks like the xterm one. If I starts these apps from alacritty its fine, but my goal is to run them from rofi.

All terminal applications are affected. As instance here is my desktop shortcut file I written for Kakoune.

[Desktop Entry]

GenericName=Text Editor
Comment=Edit text files in a terminal



The output of “echo $TERM” is alacritty when I run this command from alacritty. If I run the same in xterm the result is xterm ! I have hard time to find doc about desktop entries, some advice is welcome.

It was a rofi problem.
I added the line " terminal:“alacritty”; ", in the rofi config file, to solve the problem.

Sorry for the inconvenience you can delete the topic if you want.

There is currently no standard way to specify a default terminal emulator so it will be launcher specific. For example, Glib-based apps will just use first emulator they can find from a hardcoded list.

In the future, https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46 might be the standard.

1 Like