How to set Blackbox as default terminal emulator

Hello, I would like to set Blackbox as my default terminal emulator. I can install it via Nix, but I can’t set as my default terminal both system-wide and for GNOME. Please help!
Thank you!

Most terminal applications use the $EDITOR environment variable to decide which editor to use. Set it to blackbox with environment.variables. Careful though; since it’s a gui-only editor, it will not work in non-graphical environments.

As for gnome, you’ll need to make sure it has a .desktop file in the package, make sure it registers an appropriate mime type, and then set it as the default handler for that mime type using xdg.mime.defaultApplications.

Erm, sorry, you meant terminal emulator o\ That’s up to gnome settings, I have little experience with those. Gnome is notoriously hard to configure declaratively, it will probably involve services.xserver.desktopManager.gnome.extraGSettingsOverrides.

Sorry for being a little ambiguous! :sweat_smile:

Until the Terminal intent specification is accepted and widely implemented, there is not really a meaningful way to set up default terminal emulator.

In GNOME 44, GLib gained the ability to run xdg-terminal-exec, which despite the name is not actually standardized. You could package xdg-terminal-exec or just create xdg-terminal-exec as a symlink to blackbox and add that to PATH.

But that mostly just affects what terminal emulator will terminal programs run in. It will not affect for example Nautilus, which has Console hardcoded. You will also want GitHub - Stunkymonkey/nautilus-open-any-terminal.

Ok cool I will try that