Skip to content

gonicus/bubbles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bubbles - lightweight Linux working environments

THIS PROJECT'S UX IS VERY MUCH IN AN UNPOLISHED STAGE

Quick: Starts up in just a few seconds

Integrated: Wayland windows are managed on the host compositor

Flexible: Full access to mutable linux system

Disposable: Do not break your host; Break your bubble and discard it

Isolated: Strong KVM isolation boundary

Atomic Desktop Friendly: Works within e. g. Fedora Atomic desktops

Rootless: Does not require host root access

Comparisons

Compared to distroboxes...

Pro Bubbles:

  • allows straight-forward use of containers
  • provides isolation

Contra Bubbles:

  • not as host-integrated as distroboxes
Compared to devcontainers...

Pro Bubbles:

  • allows straight-forward use of containers (hence also devcontainers)

Contra Bubbles:

  • not part of devcontainer ecosystem
Compared to allround VM solutions like Gnome Boxes...

Pro Bubbles:

  • does not require stepping through OS installers
  • opinionated networking etc.
  • allows Wayland integration

Contra Bubbles:

  • does not support traditional VM handling use cases

Current limitations

TODO's in Bubbles

  • Management of multiple VMs/Bubbles
  • Distribution via flatpak
  • MS Windows support
  • More choices beyond Debian+Nix as guest system: e. g. Arch Linux

Imaginable opt-in Features:

  • Option to share Nix store with other VMs/Bubbles
  • Option to mount host directories
  • Option to enable pulseaudio socket forwarding
  • Option to promote .desktop files to host

Limitations from upstream components

  • EGL/GPU hardware acceleration (addressable using virtio native contexts?)
  • For some Wayland applications, sommelier crashes

Getting started

Right now, bubbles is distributed via a container outputting the required binaries into $HOME/bubbles.

Requirements:

  • podman/docker for installation
  • passt
  • qemu-img
  • curl

Loose Recommendation:

  • btrfs as backing filesystem (seems to optimize for disk image deduplication under the hood)

Install

mkdir $HOME/bubbles
# May be different for non-SELinux systems: skip ":Z"
# May be different for docker: You may need to chown files afterwards
podman run -v "$HOME/bubbles:/output:Z" ghcr.io/gonicus/bubbles/bubbles:e289a3a5479817c3ffad6bb62d8214e4265e8e4b

Run

cd $HOME/bubbles
LD_LIBRARY_PATH=$HOME/bubbles/runtime_libs $HOME/bubbles/bubbles
  1. Press image download button, await completion
  2. Press VM creation button (on non-btrfs, UI may freeze a bit - to be fixed), restart bubbles
  3. Start VM, await startup and initial setup
  4. Press Terminal button
  5. Enjoy mutable Debian+Nix Installation

The installed system is a Debian Trixie with preinstalled...

  • bubbles-agent (simple agent for serving needs of the UI)
  • sommelier
  • Nix
  • Gnome Console (kgx)
  • starship (configured for nerdfonts)

On first boot, it will fetch nixpkgs and a nerdfont. Later boots will be quicker. You can change the default terminal via the debian alternatives system.

Cheat sheet

Enforcing Wayland:

  • Chromium: chromium --ozone-platform=wayland
  • Firefox: WAYLAND_DISPLAY=wayland-0 firefox
  • VS Code:
    • mkdir -p ~/.config/Code/User && echo '{"window.titleBarStyle": "custom"}' > ~/.config/Code/User/settings.json
    • code --ozone-platform=wayland

Sound socket forwarding:

  1. On host: socat VSOCK-LISTEN:11112,fork UNIX-CONNECT:$XDG_RUNTIME_DIR/pulse/native
  2. On guest: mkdir $XDG_RUNTIME_DIR/pulse && sudo chown user: $XDG_RUNTIME_DIR/pulse && socat UNIX-LISTEN:$XDG_RUNTIME_DIR/pulse/native,fork VSOCK-CONNECT:2:11112

Using the work in...

  • crosvm + sommelier
  • rust-gtk4
  • passt
  • distrobuilder
  • ...

Releases

No releases published

Packages