As per my understanding, the default terminal and system monitor in GNOME are hard-coded. On my Fedora machine, I used the following commands to create symlinks:
The following should be the working solution for anyone wondering, it doesn’t provide the “feature” that a symlink does, so the default “open terminal here” in Nautilus won’t work because it invokes the gnome terminal, so it doesn’t really answers my question, but it should change the default application.
hmm, doesn’t seem to make a difference. The option “Open in Console” is still not available.
When I exclude the gnome-console from the excludePackages, so that I have kitty and gnome-console installed, the “Open in Console” appears again, but opens gnome-console
There is no such thing as default terminal emulator¹ or system monitor².
This would have effect on any references to those programs using absolute paths or using just the program name and relying on PATH lookup. We cannot really do much about the former (but then it would not work on NixOS anyway, since we do not have /usr/bin) but for the latter, it will be sufficient to install another package with the same program and higher priority:
Slight obstacle might be if some packages do hardcode the gnpme-terminal path (e.g. to fix absolute /usr/bin paths or to make the package more self-contained). Then you might need to override each dependent package individually:
But note that the last two options might result in breakage if any of the dependents expects anything from the package other than the gnome-terminal executable in /bin. And every option will be problematic if the dependent calls the program with a CLI option not supported by kitty.
The xdg-terminal-exec thing is currently only a proposal, not a widely supported, so the name is confusing. There is also a intent-apps specification proposal which is more versatile and appears to have more support.
This even less so, intent-apps spec might make something like that possible. But I do not think that makes much sense, except perhaps to find a process corresponding to a WM window to kill it, which I do not think is a feature GNOME has.