Score:1

configuring a flatpak app (BlackBox) as the default terminal

cn flag

So I recently installed the BlackBox terminal. I like it, and would like to set it as the default terminal. However, it's installed through flatpak and when I try running sudo update-alternatives --config x-terminal-emulator it does not appear as an option:

enter image description here

I saw that you can register new terminals with the command:

sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /path/to/emulator 1

But when I looked into what path is used to run Black Box, I found this:

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=blackbox com.raggesilver.BlackBox

So how do I configure this as an alternative? Is it even possible?

Score:2
kr flag

Got it to work with some dirty hacks, here's how:

  1. Create a bootstrap script
    echo > /usr/local/bin/blackbox <<EOF
    #!/usr/bin/env bash
    /usr/bin/flatpak run --branch=stable --arch=x86_64 --command="blackbox" com.raggesilver.BlackBox
    EOF
    sudo chmod +x /usr/local/bin/blackbox
    
  2. Install said script as alternative
    sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/local/bin/blackbox 1
    
  3. Select it as default:
    sudo update-alternatives --config x-terminal-emulator
    
yuvi avatar
cn flag
That's not really dirty that's a pretty sensible solution! For some reason external software still opens up the default terminal when I try to run it, but this is the correct answer for sure
ddxv avatar
cn flag
This solution worked great. Some apps still default to gnome-terminal based on Default Applications, but this still is mostly what I needed!
Score:1
nc flag

Can my example help you? I set up BlackBox launch via standard hotkeys. I went into settings -> search -> key -> custom -> new command flatpak run com.raggesilver.BlackBox and set CtrlAltT (for Ubuntu)

yuvi avatar
cn flag
That is helpful yes, but I'd like the system to recognize it as I'm often using tools like docker-desktop which has stuff like "launch external terminal" for containers and such. I want to tell the system to use it by default.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.