Setting up my own terminal

Hey, I have recently installed Wezterm as a flatpak, so far everything seems to work okay.

The only issue is that when I open a new tab it goes into the home directory and not into the current working directory.

I also tried to install the application through distrobox and have it exported, so I could use it without being inside the container. But the issue is that the Wezterm terminal instance opens as if I was in the container.

I was wondering as to what the best option is for installing a terminal on Ublue. Is flatpak the best way, and I just have to figure out how to actually get the current directory and set the tab? Is there some way to do it in distrobox, where the instance isn’t within a container? Or is it best to just add a layer onto the OS?

Thanks.

I’m not an expert, but I would think something so integrated with the OS as a terminal would work best by layering.

1 Like

Yeah, I think you are right. I was just wondering if I could follow the best practices as much as possible, but there could be too much to deal with, when it comes to something like a terminal.

Thanks

I had the same experience with 1Password. I tried to do it the “right” way/ways, which just added friction to using it. So I layered, and it’s been all fluffy kittens in green meadows since.

1 Like

I don’t want to sound like a nix evangelist but it turns out that on Fedora Atomic Desktops there’s a really easy way to install “native” packages without modifying your ostree. Determinate has a nix installer with a recipe that specifically works with rpm-ostree systems. This way, nix can live in /var and as such can hold distro-agnostic packages on top of ostree, without resorting to something like flatpak.

If you’ve never used nix before, you can basically just search a package name for your preferred terminal and type nix profile install nixpkgs#alacritty for example and get alacritty running without a sandbox and also without layering.

1 Like

Seems like this might be the way.
Have you ever wondered as to how much would be the limit to layering?
At what point would it be too much, and it would be better to just create your own image? Or would there only be need for the sake of having the same base software on multiple machines?

Get out of here with your nix heresy!

But seriously, this may also be a good solution! I previously have tried NixOS, but I felt the learning curve was too much, and it was sucking time away from other things that I could have been doing.

Although, if it is just a minimal amount of nix features, maybe the scale would be more manageable.

Thanks.

1 Like

Yeah, if you just interact with nix profile it’s actually quite simple. You don’t need to write/rebuild a config, but you do get the 100k+ packages at your disposal on any distro, and you don’t even need to care about the whole reproducibility/sandbox stuff as you can simply disable it. nix profile simply creates ~/.nix-profile, with all packages you’ve installed through there symlinked into it. On a multi-user nix installation (by default when you install it through determinate) by default paths like ~/.nix-profile/bin get added to the path, ~/.nix-profile/share gets added to XDG_DATA DIRS (like ~/.local/share) and so on, so the desktop integration part should be quite good.

FWIW you can still export the nix profile to json with nix profile list --json, so you can still, with a simple for loop recreate the same setup on a different machine like you might do with flatpak.

1 Like

+1 on using nix on atomic systems. However, one issue I’ve had is trying to use GUI programs installed through nix. For example, Alacritty, Wezterm or something like Beekeeper Studio fail to load due to some issues with gtk. Is this not something you’ve run into? I’ve yet to find a solution on my end.

This will definitely be worth a try at least. Thanks for the suggestion!

I just checked, and Wezterm is available on homebrew.

brew install --cask wezterm

Nix, in my experience, was a huge time-suck with no benefit for me.

Whereas homebrew is part of ublue, and supported.

1 Like

Unfortunately for me, when I try to install Wezterm through Brew it gives the following: Error: macOS is required for this software.

Maybe the flatpak can work with a custom configuration tweak.

Seems as though any brew install with the --cask options is only for macOS native applications.

Yes, its not currently supported in Linux unfortunately

Some more info about configuring the tab cwd when it opens.

Nix does seem to have some problems with openGL apps such as GPU accelerated terminals so for wezterm and alacritty using GitHub - nix-community/nixGL: A wrapper tool for nix OpenGL application [maintainer=@guibou] should help.

Oops, missed that.
20 characters