← 返回
未分类 中文

Container Gaming — Podman, Distrobox, Flatpak, Sunshine

Container-based gaming setup on Linux — Podman, Distrobox, Flatpak gaming, Wine/Proton containers, Sunshine streaming
基于容器的 Linux 游戏配置:Podman、Distrobox、Flatpak 游戏、Wine/Proton 容器、Sunshine 流媒体
silverod silverod 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 332
下载
💾 1
安装
1
版本
#distrobox#flatpak#gaming#latest#linux#podman#proton#streaming#sunshine#wine

概述

Container Gaming Manager

Manage container-based gaming on Linux — Podman, Distrobox, Flatpak gaming, Wine/Proton, and game streaming with Sunshine.

When to Use

  • Setting up gaming in containers (Podman/Distrobox)
  • Managing Flatpak game installations
  • Wine/Proton configuration and troubleshooting
  • Sunshine/Moonlight streaming setup
  • Lutris runner management
  • Game compatibility and performance issues

Container Gaming Overview

┌─────────────────────────────────────┐
│        Sunshine (Streaming)         │
├─────────────────────────────────────┤
│  Gamescope (Compositor)              │
├──────┬──────┬───────────┬───────────┤
│Steam │Flatpak│ Lutris   │ Bottles   │
├──────┴──────┴───────────┴───────────┤
│  Proton / Wine / Native              │
├─────────────────────────────────────┤
│  Podman / Distrobox / Toolbox        │
├─────────────────────────────────────┤
│  Bazzite / Fedora Atomic             │
└─────────────────────────────────────┘

Commands Reference

Podman Gaming

# List gaming containers
podman ps -a --filter name=game

# Run a Windows game in Wine container
podman run --rm -it \
  --device /dev/dri \
  -e DISPLAY=:0 \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v ~/Games:/games \
  docker.io/bottles:latest

# Pull common gaming images
podman pull docker.io/library/ubuntu:latest
podman pull docker.io/bottleshq/bottles:latest

Distrobox (Windows-like gaming in containers)

# Install Distrobox
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh

# Create gaming container (Ubuntu)
distrobox create --name gaming-ubuntu --image ubuntu:latest

# Enter container
distrobox enter gaming-ubuntu

# Install gaming tools inside container
sudo apt install wine lutris steam

# Export Steam to host
distrobox export --app steam --extra-flags "gamescope -W 1280 -H 800 -f"

# List containers
distrobox list

# Remove container
distrobox rm gaming-ubuntu

Toolbox (Fedora-native)

# Create gaming toolbox
toolbox create -c gaming

# Enter
toolbox enter gaming

# Install tools
sudo dnf install steam lutris wine

Flatpak Gaming

# Popular gaming Flatpaks
flatpak install flathub com.valvesoftware.Steam
flatpak install flathub net.lutris.Lutris
flatpak install flathub com.usebottles.bottles
flatpak install flathub org.prismlauncher.PrismLauncher
flatpak install flathub com.heroicgameslauncher.hgl
flatpak install flathub io.github.Foldex.Exodus
flatpak install flathub com.obsproject.Studio

# Update gaming Flatpaks
flatpak update com.valvesoftware.Steam net.lutris.Lutris com.usebottles.bottles

# Check runtime versions
flatpak info --runtime com.valvesoftware.Steam

# Override permissions for game
flatpak override --user --device=dri com.valvesoftware.Steam
flatpak override --user --socket=wayland com.valvesoftware.Steam

Bottles (Wine Manager)

# Install Bottles
flatpak install flathub com.usebottles.bottles

# Bottles config directory
ls ~/.local/share/bottles/

# Create custom bottle
# (Done through Bottles GUI — usually at ~/.local/share/bottles/bottles/)

Proton / Wine

# Installed Proton versions
ls ~/.steam/root/compatibilitytools.d/
ls ~/.local/share/Steam/compatibilitytools.d/

# Proton logs
cat ~/.steam/root/logs/proton* 2>/dev/null | tail -30

# Protontricks (install Windows deps for games)
protontricks <appid> corefonts d3dcompiler_47 dxvk
protontricks --list-apps 2>/dev/null | head -20

# Wine version check
wine --version 2>/dev/null

Lutris

# Lutris version
lutris --version

# List installed games
lutris --list-games

# Lutris runners
ls ~/.local/share/lutris/runners/
ls ~/.local/share/lutris/runners/wine/

# Install Lutris runner
lutris --list-runners | grep -i wine

# Lutris config
cat ~/.config/lutris/lutris.conf 2>/dev/null

Heroic Games Launcher (Epic/GOG)

# Install
flatpak install flathub com.heroicgameslauncher.hgl

# Heroic config
ls ~/.config/heroic/ 2>/dev/null
ls ~/.var/app/com.heroicgameslauncher.hgl/config/heroic/ 2>/dev/null

Sunshine (Game Streaming)

# Install Sunshine
flatpak install flathub dev.lizardbyte.app.Sunshine

# Sunshine config location
cat ~/.config/sunshine/config.conf 2>/dev/null
cat ~/.config/sunshine/apps.json 2>/dev/null

# Start Sunshine
systemctl --user start sunshine 2>/dev/null

# Sunshine logs
journalctl --user -u sunshine --since "1 hour ago" 2>/dev/null | tail -20

# Check port
ss -tlnp | grep -E '47989|47990|48010'

# Web UI
# http://localhost:47990

# Tailscale (expose to remote)
tailscale serve --bg 47989 2>/dev/null
tailscale serve --bg 47990 2>/dev/null

MangoHud (Performance Overlay)

# Enable MangoHud globally
export MANGOHUD=1

# Per-game config
mkdir -p ~/.config/MangoHud
cat > ~/.config/MangoHud/game-name.conf << 'EOF'
full
fps
cpu_temp
gpu_temp
vram
ram
frame_timing
EOF

# Gamescope + MangoHud
gamescope -W 1280 -H 800 -f -- mangohud %command%

vkBasalt (Post-processing)

# Enable
export VKBASALT_ENABLE=1

# Config
cat ~/.config/vkBasalt/vkBasalt.conf 2>/dev/null

# Effects: cas (sharpen), fxaa, smaa, dls

Common Tasks

Set up a new game via Flatpak

flatpak search "game name"
flatpak install flathub <app-id>
flatpak override --user --device=dri --socket=wayland <app-id>

Fix game performance issues

  1. Enable MangoHud: MANGOHUD=1 %command%
  2. Check GPU freq: cat /sys/class/drm/card0/device/pp_dpm_sclk
  3. Check thermal: cat /sys/class/thermal/thermal_zone*/temp
  4. Try Proton Experimental: set in Steam > Compatibility
  5. Check VRAM: games with 4GB+ VRAM may struggle on Steam Deck

Stream a game to another device

  1. Install Sunshine (Flatpak)
  2. Configure in Web UI (localhost:47990)
  3. On client: install Moonlight
  4. Connect using Tailscale IP or local IP

Troubleshooting

ProblemFix
--------------
Game won't launchCheck Proton version, try different runner
Black screenGamescope res, HDR toggle, Wayland vs X11
StutteringVRAM, thermal, MangoHud to diagnose
Audio issuessystemctl --user restart wireplumber pipewire
Sunshine no videoCheck GPU access, Sunshine permissions
Flatpak crashflatpak repair, check permissions
Wine missing DLLprotontricks
Controller not workingSteam Input, evtest, kernel modules

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 21:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,562
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,881
ai-agent

OpenClaw Dreaming Setup — Memory Consolidation Config

silverod
配置和管理 OpenClaw Dreaming — 后台记忆整合、自动升级至 MEMORY.md、梦境日记
★ 0 📥 472