Automated setup for a Fedora-based distrobox container with full development environment.
- Neovim - Headless server running via systemd
- Tmux - With custom configuration and status bar
- Git - With SSH agent forwarding
- Podman - Socket forwarding from host (see "Podman Socket Forwarding" section)
- Zsh - Default shell
- SDKMAN - Java/JVM development
- Rust - Via rustup
The host's Podman socket is forwarded to the container, enabling container workflows without running a separate daemon:
- Uses host's Podman daemon - No duplicate resource usage
- Shares images with host - No duplication of container images
- Can build and run containers - Full podman, buildah, skopeo support
- Automatic setup - Socket forwarding configured during container creation
Enable on host:
# Start the podman socket service
systemctl --user enable --now podman.socket
# Verify it's running
systemctl --user status podman.socketExample usage:
# Enter the dev container
distrobox enter dev
# Check connection to host's podman
podman ps # Lists containers running on host
podman images # Shows host's images
# Pull an image (stored on host)
podman pull fedora:latest
# Run a container
podman run --rm -it fedora:latest bash
# Build an image
podman build -t myapp .
# Run with volume mounts
podman run --rm -v $(pwd):/work myappImportant notes:
- Podman socket must be enabled on host first
- All images/containers are stored on the host
- Changes persist across container rebuilds
- Rootless mode on host (no sudo needed)
- 256-color support with RGB/truecolor
- Windows/panes start at index 1
- Mouse support enabled
- Custom status bar showing:
- π‘οΈ CPU temperature
- π» CPU usage
- π§ RAM usage
- πΎ Swap usage
- π Battery level
- π Date/time
tmux-sensible- Sensible defaultstmux-resurrect- Save/restore sessionstmux-continuum- Auto-save every 15 minutesvim-tmux-navigator- Seamless vim/tmux navigation
- Super+T - Launch Neovide GUI
- Super+R - Open terminal in container with tmux
distrobox/
βββ setup.sh # Main setup script (runs on host)
βββ setup-env.sh # System-level setup (runs as root in container)
βββ setup-user-env.sh # User-level setup (runs as user in container)
βββ tmux.conf # Tmux configuration
βββ status.sh # Status bar script
βββ README.md # This file
-
Ensure SSH keys are loaded:
ssh-add ~/.ssh/your_key -
Run setup:
cd ~/Documents/distrobox ./setup.sh
-
Setup will:
- Remove existing 'dev' container
- Create new container with isolated home
- Install all packages and tools
- Configure tmux, neovim, git, zsh
- Start neovim headless server (systemd)
- Create GNOME keyboard shortcuts
Via Keyboard Shortcut:
- Press
Super+Rto open terminal with tmux - Press
Super+Tto launch Neovide
Via Command Line:
distrobox enter devVia Neovide (manual):
neovide --server /tmp/nvimsocket- Name: dev
- Image: fedora:latest
- Home:
~/Documents/containers/dev(isolated) - Neovim Socket:
/tmp/nvimsocket - SSH Agent: Forwarded from host automatically
- Podman Socket: Forwarded from host at
/run/user/1000/podman/podman.sock
The first time you run tmux, plugins will auto-install. If they don't:
# Inside tmux
Ctrl+B, I # Install pluginsCtrl+B- Prefix keyCtrl+B, %- Split verticallyCtrl+B, "- Split horizontallyCtrl+B, [- Enter copy modeCtrl+B, d- Detach session
Ctrl+H/J/K/L- Navigate between vim splits and tmux panes
tmux new -s myproject # Create named session
tmux attach -t myproject # Attach to session
tmux ls # List sessions
tmux kill-session -t name # Kill sessionSessions are automatically saved every 15 minutes and restored on tmux startup.
The Neovim server runs automatically via systemd:
# Check status
systemctl --user status nvim-server.service
# Restart
systemctl --user restart nvim-server.service
# View logs
journalctl --user -u nvim-server.service -fSSH agent is automatically forwarded from host to container. No keys are stored in the container.
Verify it's working:
distrobox enter dev
ssh-add -l # Should list your keysEdit ~/.config/tmux/status.sh inside the container to customize the status bar.
Edit ~/.config/tmux/tmux.conf inside the container, then reload:
tmux source-file ~/.config/tmux/tmux.confYour nvim config is cloned from: https://github.com/andreluisos/nvim.git
To update:
cd ~/.config/nvim
git pullTo rebuild the container from scratch:
cd ~/Documents/distrobox
./setup.shThis will:
- Destroy the old container
- Create a fresh container
- Run all setup scripts
- Preserve keyboard shortcuts (won't create duplicates)
rm -rf ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Then in tmux: Ctrl+B, I# On host
ssh-add -l # Verify keys are loaded
# In container
echo $SSH_AUTH_SOCK # Should show /run/user/1000/gcr/ssh
ssh-add -l # Should list same keys as host# Check if nvim server is running
systemctl --user status nvim-server.service
# Check socket exists
ls -la /tmp/nvimsocket
# Restart service
systemctl --user restart nvim-server.serviceThe status bar reads from /proc - it shows container resource usage, not host resources. This is expected behavior in containers.
# On host - check if socket is running
systemctl --user status podman.socket
# If not running, enable it
systemctl --user enable --now podman.socket
# In container - verify socket exists
ls -la /run/user/1000/podman/podman.sock
# In container - test connection
podman ps
podman images$HOME/
βββ .config/
β βββ nvim/ # Neovim configuration
β βββ tmux/
β βββ tmux.conf # Tmux config
β βββ status.sh # Status bar script
βββ .tmux/plugins/tpm/ # Tmux Plugin Manager
βββ .sdkman/ # SDKMAN installation
βββ .cargo/ # Rust installation
βββ .zshrc # Zsh configuration
distrobox enter dev
sudo dnf update -y# SDKMAN packages
sdk update
sdk upgrade
# Rust
rustup update
# Tmux plugins
# In tmux: Ctrl+B, ULast Updated: March 23, 2026 Container Image: fedora:latest Distrobox Version: Compatible with latest