Distrobox vs Devpod use cases - Please share!

Can you share how you use both and why?! Don’t hesitate to be specific and opinionated for the beginners in this ecosystem like me who are still trying to understand where those solutions overlap and where they differ.
thank you!

2 Likes

IMHO, I found dev containers to be more useful than devbox, as I find dependencies easier to manage/setup in Docker. I have had many an issue with setting up devbox dependencies in the proper way (including local/global options), then to just have them not recognized, even though I directly map the nix dependency (think ‘which package’ to get the installed path).

My next choice would then be distrobox.

1 Like

thanks @arenas93, same here. I’ve been exploring more with devpod so far.
From what Jorge was saying, I understand that we can use distrobox to install the applications not available through flathub…
I’m still a bit confuse as how I would go on using them if they use a GUI as I only operate in the distrobox through the terminal… :grimacing: Beginner question!
:laughing:

I’m still a bit confuse as how I would go on using them if they use a GUI

Hey, applications with a GUI can be launched as normal through the distrobox container (e.g., if you install vscode, you can launch it with code though the terminal when in the container)

You can also create a shortcut to the apps using distrobox-export so that they show up in your GNOME app view:

  1. Inside the distrobox container, execute distrobox-export --app <app> (e.g., distrobox-export --app code)
  2. After a few seconds it should appear in your app view, clicking it will open the app

If you want to remove the shortcut then use distrobox-export --app <app> --delete

Hope this helps :slight_smile:

3 Likes

@Bambiraptor I have been using a distrobox for a number of things I need, ranging from LaTex, R, Emacs, to command-line utilities like ripgrep, etc. Please do read this writeup to give you an idea about how distrobox-export works. It has been a life saver for me.

3 Likes

thanks a lot @Casserole97 and @bmp, that’s the missing piece!
very cool, very cool, aha! :raised_hands:

1 Like

We set it up so you don’t need to install vscode inside a distrobox, you can just connect it to your existing terminal, if you do “Attach to a running container” in vscode:

This will attach to your distrobox and let you interact with it either via the system terminal or the vscode terminal.

3 Likes

I have ran into the issue of exporting VS Code through distrobox, then having any VS Code / VS Code-insiders no longer able to open natively on the host (code 132 error).

Luckily, I keep system snapshots (through booting up into Rescuezilla) - otherwise, no matter what I tried, I could not get host-installed VS Code(s) working again.

This includes vscodium.

So to agree with @j0rge, I just stick to using host-installed VS Code.

1 Like

This happened to me as well - I get 132/133 errors. Couldn’t find a fix so I’m stuck with distrobox vscode now :disappointed:

For example I installed dpscreenocr following this link and created a shortcut the way @Casserole97 explained with:
distrobox-export --app dpscreenocr
Now when I click the shortcut I get this error:
Can't create backend: Wayland is not supported. Please switch to the X11/Xorg session.

I would know how to do it with a login screen but how does it work in an ubuntu distrobox? thanks


tried the following (but no /etc/gdm3/custom.conf):

  • Edit the GDM Configuration File: Run the following command to edit the GDM configuration file:
sudo nano /etc/gdm3/custom.conf

Here, sudo gives you superuser privileges, nano is a text editor, and /etc/gdm3/custom.conf is the path to the GDM configuration file.

  • Modify the File: In the file, find the line that starts with #WaylandEnable=false. Remove the # symbol at the beginning of the line to uncomment it. This will disable Wayland and enable Xorg.
  • Save and Exit: Save the changes to the file by pressing Ctrl+O, then exit the editor by pressing Ctrl+X.
  • Restart Your Computer: For the changes to take effect, you will need to restart your computer.

Above, j0rge says that you should be able to connect VSCode to an existing distrobox container using the VSC “Attach to running container” command. I created an ubuntu container via just distrobox-ubuntu, but my OOTB VSCode appears to be wired up to docker, not podman, so that command doesn’t see the podman containers. Did I do something wrong? I’m wondering if I’m somehow on the wrong Bluefin version, because I see in the discussion here that the Prompt terminal is now builtin, but it’s not installed in my environment.

1 Like

Reading through this forum some more, it seems that Bluefin may have very recently switched to using docker instead of podman as the VSCode devcontainer backend, and that probably breaks OOTB integration with the distrobox containers. So I’m guessing that the simplest way to use VSCode in a distrobox environment is to install it and export it from within the distrobox, and then use that icon instead of the OOTB VSCode. Is that correct?

That still doesn’t explain why my machine doesn’t have Prompt (but does have another terminal called Black Box). Am I supposed to install Prompt manually, or is there something off about my machine?

Apologies if these are basic questions, I just started using Silverblue and Bluefin yesterday (I heard about Bluefin from the Hacker News post).

If you don’t have Prompt it’s because we keep you on Fedora 38 because Prompt doesn’t have a Flatpak yet so we have to include it on the image with some patches that aren’t backported to F38 yet.

As soon as Prompt publishes an official flatpak we’ll switch to that and then the experience will be the same (though I suspect Fedora 40 will come first and the entire transition will be complete.)

And yeah a Distrobox/vscode setup would need to be set by hand.

I should have linked you to the rebase settings if you want to follow along the Fedora 39 branch, that will get you Prompt:

You can also install the upstream flatpak if you want to try it without having to rebase your system!

Feel free to keep asking questions, we use the forum to improve docs, etc so answering questions is important to us!

Anybody can give me some help on this issue? thanks

Hey, sorry I can’t give any help. You could try creating a new post for more visibility?

Hi @Casserole97, yes I’ll do that. thanks

1 Like

@j0rge - Do you happen to know if Prompt has a way to pass a profile parameter to run as a command, similar to gnome-terminal? I have looked around, but I’m not sure if that’s an option.

--tab-with-profile=PROFILE exists but I don’t see one for a new window (might be worth filing that one upstream!) Let me know how you set it up, I’m trying to find the right setup and keep changing things around, heh.

I have a bluefin-cli distrobox running but it doesn’t show up in vscode when I select attach to running container
Getting the error: There are no running containers to attach to.
I’m on Fedora 39.