├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── discussion-issue-template.md │ └── feature_request.md ├── dependabot.yml └── workflows │ ├── compatibility.yml │ ├── main.yml │ └── manpages.yml ├── .gitignore ├── .markdownlint.yaml ├── .shellcheckrc ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── COPYING.md ├── Containerfile ├── completions ├── bash │ ├── distrobox │ ├── distrobox-assemble │ ├── distrobox-create │ ├── distrobox-enter │ ├── distrobox-ephemeral │ ├── distrobox-generate-entry │ ├── distrobox-list │ ├── distrobox-rm │ ├── distrobox-stop │ └── distrobox-upgrade └── zsh │ ├── _distrobox │ ├── _distrobox-assemble │ ├── _distrobox-create │ ├── _distrobox-enter │ ├── _distrobox-ephemeral │ ├── _distrobox-export │ ├── _distrobox-generate-entry │ ├── _distrobox-host-exec │ ├── _distrobox-init │ ├── _distrobox-list │ ├── _distrobox-rm │ ├── _distrobox-stop │ ├── _distrobox-upgrade │ ├── _distrobox_containers │ ├── _distrobox_images │ └── _distrobox_running_containers ├── distrobox ├── distrobox-assemble ├── distrobox-create ├── distrobox-enter ├── distrobox-ephemeral ├── distrobox-export ├── distrobox-generate-entry ├── distrobox-host-exec ├── distrobox-init ├── distrobox-list ├── distrobox-rm ├── distrobox-stop ├── distrobox-upgrade ├── docs ├── 404.md ├── CNAME ├── Gemfile ├── Gemfile.lock ├── README.md ├── _config.yml ├── _includes │ ├── footer.html │ ├── head.html │ └── header.html ├── _layouts │ └── default.html ├── apple-touch-icon.png ├── apple-touch-icon.svg ├── assets │ ├── 404.png │ ├── brand │ │ ├── distrobox-logo-guidelines.pdf │ │ ├── distrobox-symbolic.svg │ │ ├── png │ │ │ ├── distrobox-dark-mono.png │ │ │ ├── distrobox-dark-vertical-color.png │ │ │ ├── distrobox-dark-vertical-mono.png │ │ │ ├── distrobox-dark.png │ │ │ ├── distrobox-light-mono.png │ │ │ ├── distrobox-light-vertical-color.png │ │ │ ├── distrobox-light-vertical-mono.png │ │ │ ├── distrobox-light.png │ │ │ ├── distrobox-logomark-dark-mono.png │ │ │ ├── distrobox-logomark-dark.png │ │ │ ├── distrobox-logomark-light-mono.png │ │ │ ├── distrobox-logomark-light.png │ │ │ └── distros │ │ │ │ ├── alma-distrobox.png │ │ │ │ ├── alpine-distrobox.png │ │ │ │ ├── arch-distrobox.png │ │ │ │ ├── base-distrobox-1.xcf │ │ │ │ ├── centos-distrobox.png │ │ │ │ ├── clear-distrobox.png │ │ │ │ ├── debian-distrobox.png │ │ │ │ ├── fedora-distrobox.png │ │ │ │ ├── gentoo-distrobox.png │ │ │ │ ├── opensuse-distrobox.png │ │ │ │ ├── redhat-distrobox.png │ │ │ │ ├── rocky-distrobox.png │ │ │ │ ├── ubuntu-distrobox.png │ │ │ │ └── void-distrobox.png │ │ └── svg │ │ │ ├── distrobox-dark-mono.svg │ │ │ ├── distrobox-dark-vertical-color.svg │ │ │ ├── distrobox-dark-vertical-mono.svg │ │ │ ├── distrobox-dark.svg │ │ │ ├── distrobox-light-mono.svg │ │ │ ├── distrobox-light-vertical-color.svg │ │ │ ├── distrobox-light-vertical-mono.svg │ │ │ ├── distrobox-light.svg │ │ │ ├── distrobox-logomark-dark-mono.svg │ │ │ ├── distrobox-logomark-dark.svg │ │ │ ├── distrobox-logomark-light-mono.svg │ │ │ └── distrobox-logomark-light.svg │ ├── card.png │ ├── card.svg │ ├── credits.md │ ├── distro-box-alt.webp │ ├── distro-box.webp │ ├── page-logo-i.svg │ ├── page-logo.svg │ ├── png │ │ └── distros │ │ │ ├── alma-distrobox.png │ │ │ ├── alpine-distrobox.png │ │ │ ├── arch-distrobox.png │ │ │ ├── centos-distrobox.png │ │ │ ├── clear-distrobox.png │ │ │ ├── debian-distrobox.png │ │ │ ├── deepin-distrobox.png │ │ │ ├── fedora-distrobox.png │ │ │ ├── gentoo-distrobox.png │ │ │ ├── kali-distrobox.png │ │ │ ├── kdeneon-distrobox.png │ │ │ ├── opensuse-distrobox.png │ │ │ ├── redhat-distrobox.png │ │ │ ├── rocky-distrobox.png │ │ │ ├── ubuntu-distrobox.png │ │ │ ├── vanilla-distrobox.png │ │ │ └── void-distrobox.png │ ├── splash.gif │ └── splash.svg ├── compatibility.md ├── favicon.png ├── favicon.svg ├── featured_articles.md ├── fonts │ └── Inter.var.woff2 ├── posts │ ├── distrobox_custom.md │ ├── execute_commands_on_host.md │ ├── install_lilipod_static.md │ ├── install_podman_static.md │ ├── integrate_vscode_distrobox.md │ ├── posts.md │ ├── run_latest_gnome_kde_on_distrobox.md │ ├── run_libvirt_in_distrobox.md │ └── steamdeck_guide.md ├── style.css ├── usage │ ├── distrobox-assemble.md │ ├── distrobox-create.md │ ├── distrobox-enter.md │ ├── distrobox-ephemeral.md │ ├── distrobox-export.md │ ├── distrobox-generate-entry.md │ ├── distrobox-host-exec.md │ ├── distrobox-init.md │ ├── distrobox-list.md │ ├── distrobox-rm.md │ ├── distrobox-stop.md │ ├── distrobox-upgrade.md │ └── usage.md └── useful_tips.md ├── extras ├── distrobox-example-manifest.ini ├── docker-host ├── install-podman ├── podman-host └── vscode-distrobox ├── icons ├── hicolor │ ├── 128x128 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 16x16 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 22x22 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 24x24 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 256x256 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 32x32 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 36x36 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 48x48 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 64x64 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ ├── 72x72 │ │ └── apps │ │ │ └── terminal-distrobox-icon.png │ └── 96x96 │ │ └── apps │ │ └── terminal-distrobox-icon.png └── terminal-distrobox-icon.svg ├── install ├── man ├── gen-man └── man1 │ ├── distrobox-assemble.1 │ ├── distrobox-compatibility.1 │ ├── distrobox-create.1 │ ├── distrobox-enter.1 │ ├── distrobox-ephemeral.1 │ ├── distrobox-export.1 │ ├── distrobox-generate-entry.1 │ ├── distrobox-host-exec.1 │ ├── distrobox-init.1 │ ├── distrobox-list.1 │ ├── distrobox-rm.1 │ ├── distrobox-stop.1 │ ├── distrobox-upgrade.1 │ └── distrobox.1 └── uninstall /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[Error]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | Please, before opening a bug: 11 | 12 | - make sure you've read the documentation. 13 | - Ensure there isn't already an open issue about this. 14 | - Ensure there isn't already a closed/resolved issue about this. 15 | 16 | **Describe the bug** 17 | A clear and concise description of what the bug is. 18 | 19 | **To Reproduce** 20 | Steps to reproduce the behavior 21 | 22 | **Expected behavior** 23 | A clear and concise description of what you expected to happen. 24 | 25 | **Logs** 26 | Run the commands with `--verbose` and post the log here as a file upload 27 | Attach also the output of `podman logs` or `docker logs`, possibly with `--latest` flag 28 | 29 | **Desktop (please complete the following information):** 30 | - Are you using podman, docker or lilipod? 31 | - Which version or podman, docker or lilipod? 32 | - Which version of distrobox? 33 | - Which host distribution? 34 | - How did you install distrobox? 35 | 36 | **Additional context** 37 | Add any other context about the problem here. 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/discussion-issue-template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Discussion issue template 3 | about: Describe this issue template's purpose here. 4 | title: "[Discussion]" 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | Is your feature request related to a problem? Please describe. 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | Describe the solution you'd like 14 | A clear and concise description of what you want to happen. 15 | 16 | Describe alternatives you've considered 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | Additional context 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[Suggestion]" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Lint 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the main branch 8 | push: 9 | branches: [main] 10 | pull_request: 11 | branches: [main] 12 | types: [opened, synchronize, ready_for_review, edited] 13 | 14 | # Allows you to run this workflow manually from the Actions tab 15 | workflow_dispatch: 16 | 17 | jobs: 18 | dash: 19 | runs-on: ubuntu-latest 20 | 21 | steps: 22 | - uses: actions/checkout@v4 23 | 24 | - name: Run dash -n 25 | run: | 26 | result=0 27 | for file in $(find . -type f -not -path "*.git*" -a -not -path "*completions*"); do 28 | if file "$file" | grep -qi shell; then 29 | echo "### Checking file $file..." 30 | dash -n $file 31 | result=$(( result + $? )) 32 | fi 33 | done 34 | exit $result 35 | 36 | shfmt: 37 | runs-on: ubuntu-latest 38 | 39 | steps: 40 | - uses: actions/checkout@v4 41 | 42 | - name: Run shfmt 43 | run: | 44 | result=0 45 | podman pull docker.io/peterdavehello/shfmt:latest 46 | for file in $(find . -type f -not -path "*.git*"); do 47 | if file "$file" | grep -qi shell; then 48 | echo "### Checking file $file..." 49 | podman run --rm -v "$PWD:/mnt" docker.io/peterdavehello/shfmt:latest shfmt -d -s -ci -sr -kp -fn -i=0 -p /mnt/$file 50 | result=$(( result + $? )) 51 | fi 52 | done 53 | exit $result 54 | 55 | 56 | shellcheck: 57 | runs-on: ubuntu-latest 58 | 59 | steps: 60 | - uses: actions/checkout@v4 61 | 62 | # Exclude from bashate the following rules: 63 | # - SC2310 we don't want to exit if errors happen inside a check, that's why we have a check... 64 | # - SC2311 don't care if we inherit errexit inside substitutions, we do checks for that. 65 | # - SC2312 we already check errors and adding "|| true" everywhere hinders readability. 66 | - name: Run shellcheck 67 | run: | 68 | result=0 69 | podman pull docker.io/koalaman/shellcheck:stable 70 | for file in $(find . -type f -name ".*" -prune -o -print | grep -v '.git'); do 71 | if file "$file" | grep -qi shell; then 72 | echo "### Checking file $file..." 73 | # Should read the .shellcheckrc file to behave like -s sh -a -o all -Sstyle -Calways -x -e SC2310,SC2311,SC2312 74 | podman run --rm -v "$PWD:/mnt" docker.io/koalaman/shellcheck:stable -a -Sstyle -Calways $file 75 | result=$(( result + $? )) 76 | fi 77 | done 78 | exit $result 79 | 80 | differential-shellcheck: 81 | runs-on: ubuntu-latest 82 | 83 | permissions: 84 | contents: read 85 | security-events: write 86 | 87 | steps: 88 | - uses: actions/checkout@v4 89 | with: 90 | fetch-depth: 0 91 | 92 | - name: Run Differential ShellCheck 93 | uses: redhat-plumbers-in-action/differential-shellcheck@v5 94 | with: 95 | severity: style 96 | token: ${{ secrets.GITHUB_TOKEN }} 97 | 98 | bashate: 99 | runs-on: ubuntu-latest 100 | 101 | steps: 102 | - uses: actions/checkout@v4 103 | # Exclude from bashate the following rules: 104 | # - E002 we use tab indentation as suggested by shfmt. 105 | # - E003 we use tab indentation as suggested by shfmt. 106 | # - E010 for readability allow if/then and for/do to be on different lines. 107 | # - E011 for readability allow if/then and for/do to be on different lines. 108 | - name: Run bashate 109 | run: | 110 | sudo pip3 install -U bashate 111 | for file in $(find . -type f -not -path "*.git*"); do 112 | if file "$file" | grep -qi shell; then 113 | echo "### Checking file $file..." 114 | bashate -i E002,E003,E010,E011 --max-line-length 120 $file 115 | result=$(( result + $? )) 116 | fi 117 | done 118 | exit $result 119 | 120 | markdownlint: 121 | runs-on: ubuntu-latest 122 | 123 | steps: 124 | - uses: actions/checkout@v4 125 | 126 | - name: Run markdownlint 127 | run: | 128 | sudo npm install -g markdownlint-cli 129 | markdownlint $(find . -name '*.md' | grep -vF './.git') 130 | 131 | codespell: 132 | runs-on: ubuntu-latest 133 | 134 | steps: 135 | - uses: actions/checkout@v4 136 | 137 | - uses: codespell-project/actions-codespell@v2 138 | with: 139 | skip: .git,*.pdf,*.1,*.css,*.lock 140 | 141 | shell-funcheck: 142 | runs-on: ubuntu-latest 143 | 144 | steps: 145 | - uses: actions/checkout@v4 146 | 147 | - name: Run shell-funcheck 148 | run: | 149 | curl -L -O https://github.com/89luca89/shell-funcheck/releases/download/v0.0.1/shell-funcheck-amd64 150 | chmod +x ./shell-funcheck-amd64 151 | for i in distrobox*; do 152 | ./shell-funcheck-amd64 check "$i" 153 | done 154 | -------------------------------------------------------------------------------- /.github/workflows/manpages.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This is a basic workflow to help you get started with Actions 3 | 4 | name: Docs 5 | 6 | # Controls when the workflow will run 7 | on: 8 | # Triggers the workflow on push or pull request events but only for the master branch 9 | push: 10 | branches: [main] 11 | 12 | # Allows you to run this workflow manually from the Actions tab 13 | workflow_dispatch: 14 | 15 | jobs: 16 | 17 | # Check changes, cancel job is not. 18 | check_changes: 19 | runs-on: ubuntu-latest 20 | outputs: 21 | distrobox_changed: ${{ steps.check_file_changed.outputs.distrobox_changed }} 22 | steps: 23 | 24 | - uses: actions/checkout@v4 25 | with: 26 | # Checkout as many commits as needed for the diff 27 | repository: 89luca89/distrobox 28 | ref: main 29 | persist-credentials: false 30 | fetch-depth: 2 31 | token: ${{ secrets.PAT }} 32 | 33 | # Fetch from compatibility table all the distros supported 34 | - id: check_file_changed 35 | run: | 36 | if git diff --name-only HEAD^ HEAD | grep -E "^docs|gen-man"; then 37 | echo "::set-output name=distrobox_changed::True" 38 | else 39 | echo "::set-output name=distrobox_changed::False" 40 | fi 41 | 42 | gen_man: 43 | runs-on: ubuntu-latest 44 | needs: check_changes 45 | if: needs.check_changes.outputs.distrobox_changed == 'True' 46 | steps: 47 | 48 | - uses: actions/checkout@v4 49 | with: 50 | token: ${{ secrets.PAT }} 51 | 52 | # Fetch from compatibility table all the distros supported 53 | - id: generate 54 | run: | 55 | VERSION=3.6.1 56 | RELEASE="jgm/pandoc/releases/download/${VERSION}/pandoc-${VERSION}-1-amd64.deb" 57 | NAME=$(echo $RELEASE | rev | cut -d'/' -f1 | rev) 58 | 59 | curl -L https://github.com/$RELEASE -o $NAME 60 | sudo apt-get update 61 | sudo apt-get install -y ./$NAME 62 | sudo apt-get install -y ronn 63 | 64 | rm -f $NAME 65 | 66 | man/gen-man 67 | 68 | - uses: stefanzweifel/git-auto-commit-action@v5 69 | with: 70 | branch: main 71 | commit_message: Automatic Man Page Update 72 | commit_options: '--no-verify --signoff' 73 | commit_user_name: distrobox-docs-bot 74 | commit_user_email: distrobox-docs-bot@users.noreply.github.com 75 | commit_author: distrobox-docs-bot 76 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tags 2 | *.vim 3 | TODO.txt 4 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | MD013: 3 | line_length: 120 4 | code_blocks: false 5 | tables: false 6 | headings: false 7 | headers: false 8 | MD033: false 9 | MD041: false 10 | MD045: false 11 | -------------------------------------------------------------------------------- /.shellcheckrc: -------------------------------------------------------------------------------- 1 | # Overrides the shell detected from the shebang. This is useful for files meant to be included (and thus lacking a shebang), or possibly as a more targeted alternative to 'disable=SC2039'. 2 | shell=sh 3 | 4 | # Always allow ShellCheck to open arbitrary files from 'source' statements. 5 | external-sources=true 6 | 7 | # Enable all optional checks 8 | enable=all 9 | 10 | # This function is invoked in an 'if' condition so set -e will be disabled. Invoke separately if failures should cause the script to exit. 11 | # - We don't want to exit if errors happen inside a check, that's why we have a check... 12 | disable=SC2310 13 | 14 | # Bash implicitly disabled set -e for this function invocation because it's inside a command substitution. Add set -e; before it or enable inherit_errexit. 15 | # - Don't care if we inherit errexit inside substitutions, we do checks for that. 16 | disable=SC2311 17 | 18 | # Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore). 19 | # - We already check errors and adding "|| true" everywhere hinders readability. 20 | disable=SC2312 21 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Let's just all be nice to each other and ourselves. Do we really need this? 4 | 5 | Just follow them: 6 | 7 | ![wholesome](https://i.kym-cdn.com/photos/images/newsfeed/001/407/983/841.jpg) 8 | 9 | ## Let's just all be wholesome to each other please 10 | -------------------------------------------------------------------------------- /Containerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/mgoltzsche/podman:latest 2 | 3 | COPY ./distrobox* /usr/bin/ 4 | -------------------------------------------------------------------------------- /completions/bash/distrobox: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | _generate_from_help() { 4 | command=$1 5 | # if command does not exist, try with `distrobox subcommand` 6 | if ! $command --help >/dev/null 2>/dev/null ; then 7 | command="$(echo $command | tr '-' ' ')" 8 | fi 9 | 10 | local list cur prev totalopts opts diropts 11 | 12 | COMPREPLY=() 13 | 14 | cur="${COMP_WORDS[COMP_CWORD]}" 15 | prev="${COMP_WORDS[COMP_CWORD - 1]}" 16 | opts="$($command --help | sed 's|^\t||g' | grep '^--' | cut -d':' -f1 | tr '/' ' ' | tr '\n' ' ')" 17 | totalopts="$(echo $opts | tr ' ' '|')" 18 | diropts="-H|--home|--volume" 19 | fileopts="--file" 20 | 21 | if [[ ${prev} =~ ${diropts} ]]; then 22 | COMPREPLY=($(compgen -d -- ${cur})) 23 | return 0 24 | fi 25 | 26 | if [[ ${prev} =~ ${fileopts} ]]; then 27 | COMPREPLY=($(compgen -f -- ${cur})) 28 | return 0 29 | fi 30 | if [[ ${prev} == "assemble" ]]; then 31 | COMPREPLY+=($(compgen -W "create rm" -- ${cur})) 32 | return 0 33 | fi 34 | 35 | if [[ ${prev} == "--image" ]] || [[ ${prev} == "-i" ]]; then 36 | COMPREPLY+=($(compgen -W "$(distrobox-create --compatibility)" -- ${cur})) 37 | return 0 38 | fi 39 | 40 | if [[ ${cur} == -* ]]; then 41 | COMPREPLY+=($(compgen -W "${opts}" -- ${cur})) 42 | return 0 43 | elif [[ ${command} != *"create"* ]] && [[ ${command} != *"ephemeral"* ]] && 44 | [[ ${command} != *"list"* ]] && [[ ${command} != *"assemble"* ]]; then 45 | while IFS= read -r line; do 46 | list+="$line " 47 | done < <(distrobox-list --no-color | tail -n+2 | cut -d'|' -f2) 48 | COMPREPLY=($(compgen -W "${list}" "${cur}")) 49 | return 0 50 | fi 51 | } 52 | 53 | __distrobox() { 54 | if [ "${#COMP_WORDS[@]}" == "2" ]; then 55 | VALID_WORDS=$(distrobox | tail -n+4 | tr -d '|' | xargs echo) 56 | VALID_WORDS+=" --version --help" 57 | COMPREPLY=($(compgen -W "${VALID_WORDS}" -- "${COMP_WORDS[1]}")) 58 | elif [ "${#COMP_WORDS[@]}" -gt "2" ]; then 59 | _generate_from_help distrobox-"${COMP_WORDS[1]}" 60 | fi 61 | } 62 | 63 | complete -F __distrobox distrobox 64 | -------------------------------------------------------------------------------- /completions/bash/distrobox-assemble: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-assemble 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-create: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-create 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-enter: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-enter 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-ephemeral: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-ephemeral 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-generate-entry: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-generate-entry 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-list: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-list 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-rm: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-rm 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-stop: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-stop 14 | -------------------------------------------------------------------------------- /completions/bash/distrobox-upgrade: -------------------------------------------------------------------------------- 1 | # shellcheck disable=all 2 | 3 | if [ -e /usr/share/bash-completion/completions/distrobox ]; then 4 | source /usr/share/bash-completion/completions/distrobox 5 | fi 6 | if [ -e /usr/local/share/bash-completion/completions/distrobox ]; then 7 | source /usr/local/share/bash-completion/completions/distrobox 8 | fi 9 | if [ -e "${HOME}/.local/share/bash-completion/completions/distrobox" ]; then 10 | source "${HOME}/.local/share/bash-completion/completions/distrobox" 11 | fi 12 | 13 | complete -F _generate_from_help distrobox-upgrade 14 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox: -------------------------------------------------------------------------------- 1 | #compdef distrobox 2 | 3 | local curcontext="$curcontext" state line 4 | typeset -A opt_args 5 | 6 | _distrobox_commands() { 7 | local -a commands 8 | commands=( 9 | 'assemble:Handle distrobox assembly tasks' 10 | 'create:Create a new distrobox container' 11 | 'enter:Enter an existing distrobox container' 12 | 'list:List all distrobox containers' 13 | 'ls:Alias for list' 14 | 'rm:Remove a distrobox container' 15 | 'stop:Stop a running distrobox container' 16 | 'upgrade:Upgrade a distrobox container' 17 | 'ephemeral:Create a temporary distrobox container' 18 | 'generate-entry:Generate a desktop entry for a distrobox container' 19 | 'version:Show distrobox version' 20 | ) 21 | _describe -t commands 'distrobox command' commands 22 | } 23 | 24 | _arguments -C \ 25 | '1: :_distrobox_commands' \ 26 | '*:: :->args' 27 | 28 | case $state in 29 | args) 30 | case $line[1] in 31 | assemble) 32 | _distrobox-assemble 33 | ;; 34 | create) 35 | _distrobox-create 36 | ;; 37 | enter) 38 | _distrobox-enter 39 | ;; 40 | list|ls) 41 | _distrobox-list 42 | ;; 43 | rm) 44 | _distrobox-rm 45 | ;; 46 | stop) 47 | _distrobox-stop 48 | ;; 49 | upgrade) 50 | _distrobox-upgrade 51 | ;; 52 | ephemeral) 53 | _distrobox-ephemeral 54 | ;; 55 | generate-entry) 56 | _distrobox-generate-entry 57 | ;; 58 | version) 59 | # No additional completions needed for version 60 | ;; 61 | esac 62 | esac 63 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-assemble: -------------------------------------------------------------------------------- 1 | #compdef distrobox-assemble 2 | 3 | _message -r "Create or remove containers in batches, based on a manifest file." 4 | _arguments \ 5 | '1:command:(create rm)' \ 6 | '--file[path to the distrobox manifest/ini file]:file:_files' \ 7 | '(--name -n)'{-n,--name}'[run against a single entry in the manifest/ini file]:entry name:' \ 8 | '(--replace -R)'{-R,--replace}'[replace already existing distroboxes with matching names]' \ 9 | '(--dry-run -d)'{-d,--dry-run}'[only print the container manager command generated]' \ 10 | '(--verbose -v)'{-v,--verbose}'[show more verbosity]' \ 11 | '(--version -V)'{-V,--version}'[show version]' 12 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-create: -------------------------------------------------------------------------------- 1 | #compdef distrobox-create 2 | 3 | _distrobox-create() { 4 | local -a options 5 | local expl 6 | local state 7 | # Array of optargs to pass to _arguments for matching and completion 8 | options=( 9 | '(-i --image)'{-i,--image}'[Specify image to use for the container]:image:_distrobox_images' 10 | '(-n --name)'{-n,--name}'[Specify name for the distrobox]:distrobox name:' 11 | '--hostname[Specify hostname for the distrobox]:hostname:' 12 | '(-p --pull)'{-p,--pull}'[Pull the image even if it exists locally (implies --yes)]' 13 | '(-Y --yes)'{-Y,--yes}'[Non-interactive, pull images without asking]' 14 | '(-r --root)'{-r,--root}'[Launch with root privileges using podman/docker/lilipod]' 15 | '(-c --clone)'{-c,--clone}'[Name of the distrobox container to use as base for a new container]:clone container name:' 16 | '(-H --home)'{-H,--home}'[Select a custom HOME directory for the container]:path:_files -/' 17 | '--volume[Add additional volumes to the container]:volume:_files' 18 | '(-a --additional-flags)'{-a,--additional-flags}'[Additional flags to pass to the container manager command]:flags:' 19 | '(-ap --additional-packages)'{-ap,--additional-packages}'[Additional packages to install during setup]:package:' 20 | '--init-hooks[Commands to execute during container initialization]:command:' 21 | '--pre-init-hooks[Commands to execute prior to container initialization]:command:' 22 | '(-I --init)'{-I,--init}'[Use an init system inside the container]' 23 | '--nvidia[Try to integrate host nVidia drivers into the guest]' 24 | '--unshare-devsys[Do not share host devices and sysfs dirs from host]' 25 | '--unshare-groups[Do not forward users additional groups into the container]' 26 | '--unshare-ipc[Do not share ipc namespace with host]' 27 | '--unshare-netns[Do not share the net namespace with host]' 28 | '--unshare-process[Do not share process namespace with host]' 29 | '--unshare-all[Activate all the unshare flags]' 30 | '(-C --compatibility)'{-C,--compatibility}'[Show list of compatible images]' 31 | '(-h --help)'{-h,--help}'[Show this message]' 32 | '--no-entry[Do not generate a container entry in the application list]' 33 | '(-d --dry-run)'{-d,--dry-run}'[Only print the container manager command generated]' 34 | '(-v --verbose)'{-v,--verbose}'[Show more verbosity]' 35 | '(-V --version)'{-V,--version}'[Show version]' 36 | '--absolutely-disable-root-password-i-am-really-positively-sure[Skip user password setup, leaving it blank]' 37 | ) 38 | # Simple logic 39 | _message -r "Create new distroboxes." 40 | _arguments \ 41 | '1:containers:->container' \ 42 | '*:options:->options' \ 43 | $options[@] 44 | } 45 | 46 | _distrobox-create 47 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-enter: -------------------------------------------------------------------------------- 1 | #compdef distrobox-enter 2 | 3 | _distrobox-enter() { 4 | local -a options 5 | local expl 6 | local state 7 | local _db_cc 8 | 9 | _db_cc=("${(@f)$(distrobox list | sed 1d | awk -F'|' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')}") 10 | 11 | options=( 12 | '(--name -n)'{-n,--name}'[name for the distrobox]:container:_distrobox_containers' 13 | '--[end arguments and execute the rest as command to execute at login]:command:_command_names' 14 | '(--no-tty -T)'{-T,--no-tty}'[do not instantiate a tty]' 15 | '(--no-workdir -nw)'{-nw,--no-workdir}'[always start the container from container home directory]' 16 | '(--additional-flags -a)'{-a,--additional-flags}'[additional flags to pass to the container manager command]:flags:' 17 | '(--help -h)'{-h,--help}'[show this message]' 18 | '(--root -r)'{-r,--root}'[launch podman/docker/lilipod with root privileges]' 19 | '(--dry-run -d)'{-d,--dry-run}'[only print the container manager command generated]' 20 | '(--verbose -v)'{-v,--verbose}'[show more verbosity]' 21 | '(--version -V)'{-V,--version}'[show version]' 22 | ) 23 | _message -r "Start and enter a distrobox." 24 | if [[ -n "$_db_cc" ]]; then 25 | _arguments -C \ 26 | '1:containers:_distrobox_containers' \ 27 | $options[@] 28 | else 29 | _message -r "No containers exist." 30 | _arguments $options[@] 31 | fi 32 | 33 | } 34 | 35 | _distrobox-enter 36 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-ephemeral: -------------------------------------------------------------------------------- 1 | #compdef distrobox-ephemeral 2 | 3 | _distrobox-ephemeral() { 4 | local -a options 5 | local expl 6 | local state 7 | # Array of optargs to pass to _arguments for matching and completion 8 | options=( 9 | '(-i --image)'{-i,--image}'[Specify image to use for the container]:image:_distrobox_images' 10 | '(-n --name)'{-n,--name}'[Specify name for the distrobox]:distrobox name:' 11 | '--hostname[Specify hostname for the distrobox]:hostname:' 12 | '(-p --pull)'{-p,--pull}'[Pull the image even if it exists locally (implies --yes)]' 13 | '(-Y --yes)'{-Y,--yes}'[Non-interactive, pull images without asking]' 14 | '(-r --root)'{-r,--root}'[Launch with root privileges using podman/docker/lilipod]' 15 | '(-c --clone)'{-c,--clone}'[Name of the distrobox container to use as base for a new container]:clone container name:' 16 | '(-H --home)'{-H,--home}'[Select a custom HOME directory for the container]:path:_files -/' 17 | '--volume[Add additional volumes to the container]:volume:_files' 18 | '(-a --additional-flags)'{-a,--additional-flags}'[Additional flags to pass to the container manager command]:flags:' 19 | '(-ap --additional-packages)'{-ap,--additional-packages}'[Additional packages to install during setup]:package:' 20 | '--init-hooks[Commands to execute during container initialization]:command:' 21 | '--pre-init-hooks[Commands to execute prior to container initialization]:command:' 22 | '(-I --init)'{-I,--init}'[Use an init system inside the container]' 23 | '--nvidia[Try to integrate host nVidia drivers into the guest]' 24 | '--unshare-devsys[Do not share host devices and sysfs dirs from host]' 25 | '--unshare-groups[Do not forward users additional groups into the container]' 26 | '--unshare-ipc[Do not share ipc namespace with host]' 27 | '--unshare-netns[Do not share the net namespace with host]' 28 | '--unshare-process[Do not share process namespace with host]' 29 | '--unshare-all[Activate all the unshare flags]' 30 | '(-C --compatibility)'{-C,--compatibility}'[Show list of compatible images]' 31 | '(-h --help)'{-h,--help}'[Show this message]' 32 | '--no-entry[Do not generate a container entry in the application list]' 33 | '(-d --dry-run)'{-d,--dry-run}'[Only print the container manager command generated]' 34 | '(-v --verbose)'{-v,--verbose}'[Show more verbosity]' 35 | '(-V --version)'{-V,--version}'[Show version]' 36 | '--absolutely-disable-root-password-i-am-really-positively-sure[Skip user password setup, leaving it blank]' 37 | ) 38 | # Simple logic 39 | _message -r "Create temporary distroboxes that are auto destroyed." 40 | _arguments \ 41 | '1:containers:->container' \ 42 | '*:options:->options' \ 43 | $options[@] 44 | } 45 | 46 | _distrobox-ephemeral 47 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-export: -------------------------------------------------------------------------------- 1 | #compdef distrobox-export 2 | 3 | _message -r "Export an app or a binary from the container to the host." 4 | _arguments \ 5 | '(--app -a)'{-a,--app}'[name of the application to export]:application name:' \ 6 | '(--bin -b)'{-b,--bin}'[absolute path of the binary to export]:path to binary:_files' \ 7 | '(--delete -d)'{-d,--delete}'[delete exported application or binary]' \ 8 | '(--export-label -el)'{-el,--export-label}'[label to add to exported application name, use "none" to disable]:label:' \ 9 | '(--export-path -ep)'{-ep,--export-path}'[path where to export the binary]:export path:_files' \ 10 | '(--extra-flags -ef)'{-ef,--extra-flags}'[extra flags to add to the command]:extra flags:' \ 11 | '(--enter-flags -nf)'{-nf,--enter-flags}'[flags to add to distrobox-enter]:enter flags:' \ 12 | '--list-apps[list applications exported from this container]' \ 13 | '--list-binaries[list binaries exported from this container, use -ep to specify custom paths to search]' \ 14 | '(--sudo -S)'{-S,--sudo}'[specify if the exported item should be run as sudo]' \ 15 | '(--help -h)'{-h,--help}'[show this message]' \ 16 | '(--verbose -v)'{-v,--verbose}'[show more verbosity]' \ 17 | '(--version -V)'{-V,--version}'[show version]' 18 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-generate-entry: -------------------------------------------------------------------------------- 1 | #compdef distrobox-generate-entry 2 | 3 | _distrobox-generate-entry() { 4 | # expl is an internal zsh array that gets passed to _arguments bts 5 | local expl 6 | local -a options 7 | local _db_cc 8 | # Check for existing containers and store the result into var _db_cc 9 | _db_cc=("${(@f)$(distrobox list | sed 1d | awk -F'|' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')}") 10 | # Array of optargs to pass to _arguments for matching and completion 11 | options=( 12 | '(-h --help)'{-h,--help}'[show this message]' 13 | '(-a --all)'{-a,--all}'[perform for all distroboxes]' 14 | '(-d --delete)'{-d,--delete}'[delete the entry]' 15 | '(-i --icon)'{-i,--icon}'[specify a custom icon (default auto)]:icon path:(auto _files)' 16 | '(-r --root)'{-r,--root}'[perform on rootful distroboxes]' 17 | '(-v --verbose)'{-v,--verbose}'[show more verbosity]' 18 | '(-V --version)'{-V,--version}'[show version]' 19 | ) 20 | _message -r "Create a desktop icon for a distrobox" 21 | # If containers exist then do an action 22 | if [[ -n "$_db_cc" ]]; then 23 | # Match both container names and optargs 24 | _arguments \ 25 | '*:containers:_distrobox_containers' \ 26 | $options[@] 27 | # If no containers exist then do an action 28 | else 29 | # Display message to user and match optargs only 30 | _message -r "No containers exist." 31 | _arguments $options[@] 32 | fi 33 | } 34 | 35 | _distrobox-generate-entry 36 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-host-exec: -------------------------------------------------------------------------------- 1 | #compdef distrobox-host-exec 2 | 3 | _message -r "Execute a command on the host while in a container" 4 | _arguments \ 5 | '*:command:_command' \ 6 | '(--help -h)'{-h,--help}'[show this message]' \ 7 | '(--verbose -v)'{-v,--verbose}'[show more verbosity]' \ 8 | '(--version -V)'{-V,--version}'[show version]' \ 9 | '(--yes -Y)'{-Y,--yes}'[Automatically answer yes to prompt host-spawn will be installed on the guest system if not detected]' 10 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-init: -------------------------------------------------------------------------------- 1 | #compdef distrobox-init 2 | 3 | _message -r "Init the distrobox (not to be launched manually)" 4 | _arguments \ 5 | '(--name -n)'{-n,--name}'[user name]:user name:' \ 6 | '(--user -u)'{-u,--user}'[uid of the user]:uid:' \ 7 | '(--group -g)'{-g,--group}'[gid of the user]:gid:' \ 8 | '(--home -d)'{-d,--home}'[path/to/home of the user]:home path:_files' \ 9 | '(--help -h)'{-h,--help}'[show this message]' \ 10 | '--additional-packages[packages to install in addition]:packages:' \ 11 | '(--init -I)'{-I,--init}'[whether to use or not init]' \ 12 | '--pre-init-hooks[commands to execute prior to init]:commands:' \ 13 | '--nvidia[try to integrate hosts nVidia drivers in the guest]' \ 14 | '(--upgrade -U)'{-U,--upgrade}'[run init in upgrade mode]' \ 15 | '(--verbose -v)'{-v,--verbose}'[show more verbosity]' \ 16 | '(--version -V)'{-V,--version}'[show version]' \ 17 | '--:[end arguments execute the rest as command to execute during init]:command:_command' 18 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-list: -------------------------------------------------------------------------------- 1 | #compdef distrobox-list 2 | 3 | _message -r "List available distroboxes." 4 | _arguments \ 5 | '(--help -h)'{-h,--help}'[show this message]' \ 6 | '--no-color[disable color formatting]' \ 7 | '(--root -r)'{-r,--root}'[launch podman/docker/lilipod with root privileges]' \ 8 | '(--verbose -v)'{-v,--verbose}'[show more verbosity]' \ 9 | '(--version -V)'{-V,--version}'[show version]' 10 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-rm: -------------------------------------------------------------------------------- 1 | #compdef distrobox-rm 2 | 3 | _distrobox-rm() { 4 | # expl is an internal zsh array that gets passed to _arguments bts 5 | local expl 6 | local -a options 7 | local _db_cc 8 | # Check for existing containers and store the result into var _db_cc 9 | _db_cc=("${(@f)$(distrobox list | sed 1d | awk -F'|' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')}") 10 | # Array of optargs to pass to _arguments for matching and completion 11 | options=( 12 | '(-a --all)'{-a,--all}'[delete all distroboxes]' 13 | '(-f --force)'{-f,--force}'[force deletion]' 14 | '--rm-home[remove the mounted home if it differs from the host users one]' 15 | '(-r --root)'{-r,--root}'[launch podman/docker/lilipod with root privileges]' 16 | '(-h --help)'{-h,--help}'[show this message]' 17 | '(-v --verbose)'{-v,--verbose}'[show more verbosity]' 18 | '(-V --version)'{-V,--version}'[show version]' 19 | ) 20 | _message -r "Delete one or more distroboxes." 21 | # If containers exist then do an action 22 | if [[ -n "$_db_cc" ]]; then 23 | # Match both container names and optargs 24 | _arguments \ 25 | '*:containers:_distrobox_containers' \ 26 | $options[@] 27 | # If no containers exist then do an action 28 | else 29 | # Display message to user and match optargs only 30 | _message -r "No containers exist." 31 | _arguments $options[@] 32 | fi 33 | 34 | } 35 | 36 | _distrobox-rm 37 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-stop: -------------------------------------------------------------------------------- 1 | #compdef distrobox-stop 2 | 3 | _distrobox-stop() { 4 | local expl 5 | local -a options 6 | local _db_rcc 7 | 8 | _db_rcc=($(distrobox list | awk -F'|' '$3 ~ /Up/ { gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2 }')) 9 | 10 | options=( 11 | '(-a --all)'{-a,--all}'[stop all distroboxes]' 12 | '(-Y --yes)'{-Y,--yes}'[non-interactive, stop without asking]' 13 | '(-r --root)'{-r,--root}'[launch podman/docker/lilipod with root privileges]' 14 | '(-h --help)'{-h,--help}'[show this message]' 15 | '(-v --verbose)'{-v,--verbose}'[show more verbosity]' 16 | '(-V --version)'{-V,--version}'[show version]' 17 | ) 18 | 19 | _message -r "Stop running distrobox containers." 20 | if [[ -n "$_db_rcc" ]]; then 21 | _arguments -C \ 22 | '*:containers:_distrobox_running_containers' \ 23 | $options[@] 24 | else 25 | _message -r "No running containers." 26 | _arguments $options[@] 27 | fi 28 | 29 | } 30 | 31 | _distrobox-stop 32 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox-upgrade: -------------------------------------------------------------------------------- 1 | #compdef distrobox-upgrade 2 | 3 | _distrobox-upgrade() { 4 | local expl 5 | local -a options 6 | local _db_cc 7 | 8 | _db_cc=("${(@f)$(distrobox list | sed 1d | awk -F'|' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')}") 9 | 10 | options=( 11 | '(-a --all)'{-a,--all}'[upgrade all distroboxes]' 12 | '--running[perform only for running distroboxes]' 13 | '(-r --root)'{-r,--root}'[launch podman/docker/lilipod with root privileges]' 14 | '(-h --help)'{-h,--help}'[show this message]' 15 | '(-v --verbose)'{-v,--verbose}'[show more verbosity]' 16 | '(-V --version)'{-V,--version}'[show version]' 17 | ) 18 | 19 | _message -r "Upgrade distroboxes using container's package manager." 20 | if [[ -n "$_db_cc" ]]; then 21 | _arguments \ 22 | '*:containers:_distrobox_containers' \ 23 | $options[@] 24 | else 25 | _message -r "No containers exist." 26 | _arguments $options[@] 27 | fi 28 | 29 | } 30 | 31 | _distrobox-upgrade 32 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox_containers: -------------------------------------------------------------------------------- 1 | #autoload 2 | 3 | _distrobox_containers() { 4 | local -a containers 5 | containers=("${(@f)$(distrobox list | sed 1d | awk -F'|' '{print $2}' | sed 's/^[ \t]*//;s/[ \t]*$//')}") 6 | _describe -t containers 'available containers' containers 7 | } 8 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox_images: -------------------------------------------------------------------------------- 1 | #autoload 2 | 3 | _distrobox_images() { 4 | local -a images 5 | images=("${(@f)$(distrobox-create --compatibility | awk 'NF {print $0}')}") 6 | _wanted images expl 'compatible image' compadd -a images 7 | } 8 | -------------------------------------------------------------------------------- /completions/zsh/_distrobox_running_containers: -------------------------------------------------------------------------------- 1 | #autoload 2 | 3 | _distrobox_running_containers() { 4 | local -a containers 5 | containers=($(distrobox list | awk -F'|' '$3 ~ /Up/ { gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2 }')) 6 | if (( ${#containers} > 0 )); then 7 | _describe -t running-containers 'running containers' containers 8 | fi 9 | } 10 | -------------------------------------------------------------------------------- /distrobox: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SPDX-License-Identifier: GPL-3.0-only 3 | # 4 | # This file is part of the distrobox project: 5 | # https://github.com/89luca89/distrobox 6 | # 7 | # Copyright (C) 2021 distrobox contributors 8 | # 9 | # distrobox is free software; you can redistribute it and/or modify it 10 | # under the terms of the GNU General Public License version 3 11 | # as published by the Free Software Foundation. 12 | # 13 | # distrobox is distributed in the hope that it will be useful, but 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | # General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with distrobox; if not, see . 20 | 21 | # POSIX 22 | set -o errexit 23 | set -o nounset 24 | 25 | version="1.8.1.2" 26 | 27 | # show_help will print usage to stdout. 28 | # Arguments: 29 | # None 30 | # Expected global variables: 31 | # version: distrobox version 32 | # Expected env variables: 33 | # None 34 | # Outputs: 35 | # print usage with examples. 36 | show_help() 37 | { 38 | cat << EOF 39 | distrobox version: ${version} 40 | 41 | Choose one of the available commands: 42 | assemble 43 | create 44 | enter 45 | list | ls 46 | rm 47 | stop 48 | upgrade 49 | ephemeral 50 | generate-entry 51 | version 52 | help 53 | EOF 54 | } 55 | 56 | if [ $# -eq 0 ]; then 57 | show_help 58 | exit 59 | fi 60 | 61 | distrobox_path="$(dirname "${0}")" 62 | distrobox_command="${1}" 63 | shift 64 | 65 | # Simple wrapper to the distrobox utilities. 66 | # We just detect the 1st argument and launch the matching distrobox utility. 67 | case "${distrobox_command}" in 68 | assemble) 69 | "${distrobox_path}"/distrobox-assemble "$@" 70 | ;; 71 | create) 72 | "${distrobox_path}"/distrobox-create "$@" 73 | ;; 74 | enter) 75 | "${distrobox_path}"/distrobox-enter "$@" 76 | ;; 77 | ls | list) 78 | "${distrobox_path}"/distrobox-list "$@" 79 | ;; 80 | stop) 81 | "${distrobox_path}"/distrobox-stop "$@" 82 | ;; 83 | rm) 84 | "${distrobox_path}"/distrobox-rm "$@" 85 | ;; 86 | upgrade) 87 | "${distrobox_path}"/distrobox-upgrade "$@" 88 | ;; 89 | generate-entry) 90 | "${distrobox_path}"/distrobox-generate-entry "$@" 91 | ;; 92 | ephemeral) 93 | "${distrobox_path}"/distrobox-ephemeral "$@" 94 | ;; 95 | -V | --version | version) 96 | printf "distrobox: %s\n" "${version}" 97 | exit 0 98 | ;; 99 | help | --help | -h) 100 | show_help 101 | exit 0 102 | ;; 103 | *) # Default case: If no more options then break out of the loop. 104 | printf >&2 "Error: invalid command\n" 105 | show_help 106 | exit 1 107 | ;; 108 | esac 109 | -------------------------------------------------------------------------------- /docs/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | permalink: /404.html 4 | --- 5 | 6 | ![404]({{site.baseurl}}/assets/404.png){:.full.pixels} 7 | 8 | # Document Not Found 9 | 10 | The requested page could not be found. If you feel this is not normal, then you create an issue on the Gitlab. 11 | 12 | [Go Back](){: .inline-button} [File an issue]({{site.issuesurl}}) 13 | {: .dialog-buttons} 14 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | distrobox.it 2 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # Hello! This is where you manage which Jekyll version is used to run. 4 | # When you want to use a different version, change it below, save the 5 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: 6 | # 7 | # bundle exec jekyll serve 8 | # 9 | # This will help ensure the proper Jekyll version is running. 10 | # Happy Jekylling! 11 | gem "jekyll", "~> 4.1.0" 12 | 13 | # This is the default theme for new Jekyll sites. You may change this to anything you like. 14 | 15 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and 16 | # uncomment the line below. To upgrade, run `bundle update github-pages`. 17 | # gem "github-pages", group: :jekyll_plugins 18 | 19 | # If you have any plugins, put them here! 20 | group :jekyll_plugins do 21 | # gem 'jekyll-feed', '~> 0.13' 22 | # gem 'jekyll-sitemap', '~> 1.4' 23 | # gem 'jekyll-compose', '~> 0.12.0' 24 | # gem 'jekyll-postfiles', '~> 3.1' 25 | end 26 | 27 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 28 | # gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] 29 | 30 | # Performance-booster for watching directories on Windows 31 | # gem "wdm", "~> 0.1.0" if Gem.win_platform? 32 | -------------------------------------------------------------------------------- /docs/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.0) 5 | public_suffix (>= 2.0.2, < 5.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.1.9) 8 | em-websocket (0.5.2) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0.6.0) 11 | eventmachine (1.2.7) 12 | ffi (1.15.4) 13 | forwardable-extended (2.6.0) 14 | http_parser.rb (0.6.0) 15 | i18n (1.8.10) 16 | concurrent-ruby (~> 1.0) 17 | jekyll (4.1.1) 18 | addressable (~> 2.4) 19 | colorator (~> 1.0) 20 | em-websocket (~> 0.5) 21 | i18n (~> 1.0) 22 | jekyll-sass-converter (~> 2.0) 23 | jekyll-watch (~> 2.0) 24 | kramdown (~> 2.1) 25 | kramdown-parser-gfm (~> 1.0) 26 | liquid (~> 4.0) 27 | mercenary (~> 0.4.0) 28 | pathutil (~> 0.9) 29 | rouge (~> 3.0) 30 | safe_yaml (~> 1.0) 31 | terminal-table (~> 1.8) 32 | jekyll-sass-converter (2.1.0) 33 | sassc (> 2.0.1, < 3.0) 34 | jekyll-watch (2.2.1) 35 | listen (~> 3.0) 36 | kramdown (2.3.1) 37 | rexml 38 | kramdown-parser-gfm (1.1.0) 39 | kramdown (~> 2.0) 40 | liquid (4.0.3) 41 | listen (3.7.0) 42 | rb-fsevent (~> 0.10, >= 0.10.3) 43 | rb-inotify (~> 0.9, >= 0.9.10) 44 | mercenary (0.4.0) 45 | pathutil (0.16.2) 46 | forwardable-extended (~> 2.6) 47 | public_suffix (4.0.6) 48 | rb-fsevent (0.11.0) 49 | rb-inotify (0.10.1) 50 | ffi (~> 1.0) 51 | rexml (3.2.5) 52 | rouge (3.26.1) 53 | safe_yaml (1.0.5) 54 | sassc (2.4.0) 55 | ffi (~> 1.9) 56 | terminal-table (1.8.0) 57 | unicode-display_width (~> 1.1, >= 1.1.1) 58 | unicode-display_width (1.8.0) 59 | 60 | PLATFORMS 61 | x86_64-linux 62 | 63 | DEPENDENCIES 64 | jekyll (~> 4.1.0) 65 | 66 | BUNDLED WITH 67 | 2.2.7 68 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | # Site settings 2 | title: Distrobox 3 | baseurl: "/" # the subpath of your site, e.g. /blog/ 4 | # usually empty. necessary for building absolute URIs 5 | # for metadata header 6 | url: "https://distrobox.it" # the base hostname & protocol for your site 7 | sourceurl: "https://github.com/89luca89/distrobox/tree/main/docs" # "edit this website" link in the footer 8 | description: "Use any linux distribution inside your terminal." 9 | issuesurl: "https://github.com/89luca89/distrobox/issues" # issue tracker for website 10 | permalink: /:title/ 11 | primary-color: "#70594d" #used in ios theme. further color customization in style.css 12 | 13 | # Build settings 14 | markdown: kramdown 15 | -------------------------------------------------------------------------------- /docs/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/_includes/header.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | 8 | {% include header.html %} 9 | 10 |
11 | {{ content }} 12 |
13 | 14 | {% include footer.html %} 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/apple-touch-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/404.png -------------------------------------------------------------------------------- /docs/assets/brand/distrobox-logo-guidelines.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/distrobox-logo-guidelines.pdf -------------------------------------------------------------------------------- /docs/assets/brand/distrobox-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-dark-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-dark-mono.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-dark-vertical-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-dark-vertical-color.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-dark-vertical-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-dark-vertical-mono.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-dark.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-light-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-light-mono.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-light-vertical-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-light-vertical-color.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-light-vertical-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-light-vertical-mono.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-light.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-logomark-dark-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-logomark-dark-mono.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-logomark-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-logomark-dark.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-logomark-light-mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-logomark-light-mono.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distrobox-logomark-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distrobox-logomark-light.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/alma-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/alma-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/alpine-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/alpine-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/arch-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/arch-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/base-distrobox-1.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/base-distrobox-1.xcf -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/centos-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/centos-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/clear-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/clear-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/debian-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/debian-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/fedora-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/fedora-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/gentoo-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/gentoo-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/opensuse-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/opensuse-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/redhat-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/redhat-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/rocky-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/rocky-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/ubuntu-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/ubuntu-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/png/distros/void-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/brand/png/distros/void-distrobox.png -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-dark-mono.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-dark-vertical-mono.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-light-mono.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-light-vertical-mono.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-logomark-dark-mono.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-logomark-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-logomark-light-mono.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/assets/brand/svg/distrobox-logomark-light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/assets/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/card.png -------------------------------------------------------------------------------- /docs/assets/card.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/assets/credits.md: -------------------------------------------------------------------------------- 1 | # Assets credits 2 | 3 | ## Logo 4 | 5 | Previous logo was created by [j4ckr3d](https://github.com/j4ckr3d) 6 | 7 | Current logo was created by [daudix-UFO](https://github.com/daudix-UFO) 8 | 9 | ## Images 10 | 11 | Assets used in `distro-box.webp` 12 | 13 | - [Cardboard Box](https://skfb.ly/6Wq6q) model by 14 | [J0Y](https://sketchfab.com/lloydrostek) licensed under 15 | [Creative Commons Attribution 4.0](http://creativecommons.org/licenses/by/4.0) 16 | - [GTK Loop Animation](https://github.com/gnome-design-team/gnome-mockups/blob/master/gtk/loop6.blend) by 17 | [GNOME Project](https://www.gnome.org) licensed under 18 | [Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0) as a pre-configured scene 19 | - Distro icons by 20 | [u/walrusz](https://www.reddit.com/r/linux/comments/nt1tm9/i_made_a_uniform_icon_set_of_linux_distribution) 21 | 22 | Assets used in `distro-box-alt.webp` 23 | 24 | - ['90 Light Commercial Truck](https://skfb.ly/ootyy) model by 25 | [Daniel Zhabotinsky](https://sketchfab.com/DanielZhabotinsky) licensed under 26 | [Creative Commons Attribution 4.0](http://creativecommons.org/licenses/by/4.0) 27 | - [Cardboard Box](https://skfb.ly/6Wq6q) model by 28 | [J0Y](https://sketchfab.com/lloydrostek) licensed under 29 | [Creative Commons Attribution 4.0](http://creativecommons.org/licenses/by/4.0) 30 | - [GTK Loop Animation](https://github.com/gnome-design-team/gnome-mockups/blob/master/gtk/loop6.blend) by 31 | [GNOME Project](https://www.gnome.org) licensed under 32 | [Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0) as a pre-configured scene 33 | - Distro icons by 34 | [u/walrusz](https://www.reddit.com/r/linux/comments/nt1tm9/i_made_a_uniform_icon_set_of_linux_distribution) 35 | -------------------------------------------------------------------------------- /docs/assets/distro-box-alt.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/distro-box-alt.webp -------------------------------------------------------------------------------- /docs/assets/distro-box.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/distro-box.webp -------------------------------------------------------------------------------- /docs/assets/page-logo-i.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/assets/page-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/assets/png/distros/alma-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/alma-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/alpine-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/alpine-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/arch-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/arch-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/centos-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/centos-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/clear-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/clear-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/debian-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/debian-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/deepin-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/deepin-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/fedora-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/fedora-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/gentoo-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/gentoo-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/kali-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/kali-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/kdeneon-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/kdeneon-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/opensuse-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/opensuse-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/redhat-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/redhat-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/rocky-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/rocky-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/ubuntu-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/ubuntu-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/vanilla-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/vanilla-distrobox.png -------------------------------------------------------------------------------- /docs/assets/png/distros/void-distrobox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/png/distros/void-distrobox.png -------------------------------------------------------------------------------- /docs/assets/splash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/assets/splash.gif -------------------------------------------------------------------------------- /docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/favicon.png -------------------------------------------------------------------------------- /docs/favicon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/featured_articles.md: -------------------------------------------------------------------------------- 1 | - [Distrobox](README.md) 2 | - [Featured articles](#articles) 3 | - [Talks](#talks) 4 | - [Podcasts](#podcasts) 5 | 6 | --- 7 | 8 | ## Articles 9 | 10 | - [Run Distrobox on Fedora Linux - Fedora Magazine](https://fedoramagazine.org/run-distrobox-on-fedora-linux/) 11 | - [DistroBox – Run Any Linux Distribution Inside Linux Terminal - TecMint](https://www.tecmint.com/distrobox-run-any-linux-distribution/) 12 | - [Distrobox: Try Multiple Linux Distributions via the Terminal - It's FOSS](https://itsfoss.com/distrobox/) 13 | - [Distrobox - How to quickly deploy a Linux distribution with GUI applications via a container](https://www.techrepublic.com/article/how-to-quickly-deploy-a-linux-distribution-with-gui-applications-via-a-container/) 14 | - [Using Distrobox To Augment The Package Selection On Clear Linux - Phoronix](https://www.phoronix.com/scan.php?page=news_item&px=Distrobox-Clear-Linux) 15 | - [Benchmark: benefits of Clear Linux containers (distrobox) - Phoronix](https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1305326-clear-linux-container-performance-continues-showing-sizable-gains) 16 | - [Distrobox - A great item in the Linux toolbelt - phmurphy's blog](https://phmurphy.com/posts/distrobox-toolbelt/) 17 | - Running Other Linux Distros with Distrobox on Fedora Linux - bandithijo's blog: 18 | [ORIGINAL](https://bandithijo.github.io/blog/menjalankan-distro-linux-lain-dengan-distrobox-di-fedora-linux) 19 | or [TRANSLATED](https://bandithijo-github-io.translate.goog/blog/menjalankan-distro-linux-lain-dengan-distrobox-di-fedora-linux?_x_tr_sl=id&_x_tr_tl=en&_x_tr_hl=it&_x_tr_pto=wapp) 20 | - [Distrobox: Run (pretty much) any Linux distro under almost any other - TheRegister](https://www.theregister.com/2022/05/31/distrobox_130_released/) 21 | - [Day-to-day differences between Fedora Silverblue and Ubuntu - castrojo's blog](https://www.ypsidanger.com/day-to-day-advantages-of-fedora-silverblue/) 22 | - [Distrobox is Awesome - Running Window Manager and Desktop environments using Distrobox](https://cloudyday.tech.blog/2022/05/14/distrobox-is-awesome/) 23 | - [Japanese input on Clear Linux with Mozc via Ubuntu container with Distrobox](https://impsbl.hatenablog.jp/entry/JapaneseInputOnClearLinuxWithMozc_en) 24 | - [MID (MaXX Interactive Desktop) on Clear Linux via Ubuntu container with Distrobox](https://impsbl.hatenablog.jp/entry/MIDonClearLinuxWithDistrobox_en) 25 | 26 | ## Talks 27 | 28 | - [Linux App Summit 2022 - Distrobox: Run Any App On Any Distro - BoF](https://github.com/89luca89/distrobox/files/8598433/distrobox-las-talk.pdf) 29 | - [A "Box" Full of Tools and Distros - Dario Faggioli @ OpenSUSE Conference 2022](https://www.youtube.com/watch?v=_RzARte80SQ) 30 | 31 | ## Podcasts 32 | 33 | - [Linux After Dark – Episode 07](https://linuxafterdark.net/linux-after-dark-episode-07/) 34 | - [Linux Lads - Season 7 - Episode 1](https://linuxlads.com/episodes/season-7-episode-1) 35 | - [Late Night Linux - Episode 39](https://latenightlinux.com/linux-downtime-episode-39/) 36 | - [Late After Dark - Episode 16](https://linuxafterdark.net/linux-after-dark-episode-16/) 37 | -------------------------------------------------------------------------------- /docs/fonts/Inter.var.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/docs/fonts/Inter.var.woff2 -------------------------------------------------------------------------------- /docs/posts/distrobox_custom.md: -------------------------------------------------------------------------------- 1 | - [Distrobox](README.md) 2 | 3 | --- 4 | 5 | # Create a dedicated distrobox container 6 | 7 | Distrobox wants to be as generic as possible in supporting OCI images, 8 | but sometimes there could be some problems: 9 | 10 | - The image you want to use is too old and the package manager mirrors are down 11 | - The image you want to use has not a supported package manager or no package 12 | manager at all 13 | 14 | ## Requirements 15 | 16 | The only required programs that must be available in the container so that 17 | `distrobox-init` won't start the installation are: 18 | 19 | - the $SHELL you use (bash, zsh, fish etc etc) 20 | - bash-completion 21 | - bc 22 | - bzip2 23 | - curl 24 | - diffutils 25 | - findutils 26 | - gnupg2 27 | - hostname 28 | - iproute 29 | - iputils 30 | - keyutils 31 | - krb5-libs 32 | - less 33 | - lsof 34 | - man-db 35 | - man-pages 36 | - ncurses 37 | - nss-mdns 38 | - openssh-clients 39 | - pam 40 | - passwd 41 | - pigz 42 | - pinentry 43 | - ping 44 | - procps-ng 45 | - rsync 46 | - shadow-utils 47 | - sudo 48 | - tcpdump 49 | - time 50 | - traceroute 51 | - tree 52 | - tzdata 53 | - unzip 54 | - util-linux 55 | - vte-profile 56 | - wget 57 | - which 58 | - whois 59 | - words 60 | - xorg-x11-xauth 61 | - xz 62 | - zip 63 | 64 | And optionally: 65 | 66 | - mesa-dri-drivers 67 | - mesa-vulkan-drivers 68 | - vulkan 69 | 70 | If all those dependencies are met, then the `distrobox-init` 71 | will simply skip the installation process and work as expected. 72 | 73 | To test if all packages requirements are met just run this in the container: 74 | 75 | ```shell 76 | dependencies=" 77 | bc 78 | bzip2 79 | chpasswd 80 | curl 81 | diff 82 | find 83 | findmnt 84 | gpg 85 | hostname 86 | less 87 | lsof 88 | man 89 | mount 90 | passwd 91 | pigz 92 | pinentry 93 | ping 94 | ps 95 | rsync 96 | script 97 | ssh 98 | sudo 99 | time 100 | tree 101 | umount 102 | unzip 103 | useradd 104 | wc 105 | wget 106 | xauth 107 | zip 108 | " 109 | for dep in ${dependencies}; do 110 | ! command -v "${dep}" && echo "missing $dep" 111 | done 112 | ``` 113 | -------------------------------------------------------------------------------- /docs/posts/execute_commands_on_host.md: -------------------------------------------------------------------------------- 1 | - [Distrobox](../README.md) 2 | - [Execute a command on the host](#execute-a-command-on-the-host) 3 | - [With distrobox-host-exec](#with-distrobox-host-exec) 4 | - [Using symlinks](#using-symlinks) 5 | - [Integrate host with container seamlessly](#integrate-host-with-container-seamlessly) 6 | - [bash or zsh](#bash-or-zsh) 7 | - [fish](#fish) 8 | 9 | --- 10 | 11 | # Execute a command on the host 12 | 13 | It may be needed to execute commands back on the host. Be it the filemanager, an 14 | archive manager, a container manager and so on. 15 | 16 | Here are a couple of solutions. 17 | 18 | ## With distrobox-host-exec 19 | 20 | distrobox offers the `distrobox-host-exec` helper, that can be used exactly for this. 21 | 22 | See [distrobox-host-exec](../usage/distrobox-host-exec.md). 23 | 24 | ```console 25 | user@fedora-distrobox:~$ which podman 26 | /usr/bin/which: no podman in [...] 27 | user@fedora-distrobox:~$ distrobox-host-exec podman version # <-- this is executed on host. 28 | Client: 29 | Version: 3.4.2 30 | API Version: 3.4.2 31 | Go Version: go1.16.6 32 | Built: Thu Jan 1 01:00:00 1970 33 | OS/Arch: linux/amd64 34 | 35 | Server: 36 | Version: 3.4.2 37 | API Version: 3.4.2 38 | Go Version: go1.16.6 39 | Built: Thu Jan 1 01:00:00 1970 40 | OS/Arch: linux/amd64 41 | ``` 42 | 43 | ## Using symlinks 44 | 45 | Another way to execute commands on the host, is to create executables symlinking `distrobox-host-exec`: 46 | 47 | ```console 48 | user@fedora-distrobox:~$ ln -s /usr/bin/distrobox-host-exec /usr/local/bin/podman 49 | user@fedora-distrobox:~$ ls -l /usr/local/bin/podman 50 | lrwxrwxrwx. 1 root root 51 Jul 11 19:26 /usr/local/bin/podman -> /usr/bin/distrobox-host-exec 51 | user@fedora-distrobox:~$ podman version # <-- this is executed on host. Equivalent to "distrobox-host-exec podman version" 52 | Client: 53 | Version: 3.4.2 54 | API Version: 3.4.2 55 | Go Version: go1.16.6 56 | Built: Thu Jan 1 01:00:00 1970 57 | OS/Arch: linux/amd64 58 | 59 | Server: 60 | Version: 3.4.2 61 | API Version: 3.4.2 62 | Go Version: go1.16.6 63 | Built: Thu Jan 1 01:00:00 1970 64 | OS/Arch: linux/amd64 65 | ``` 66 | 67 | # Integrate host with container seamlessly 68 | 69 | Another cool trick we can pull, is to use the handy `command_not_found_handle` function 70 | to try and execute missing commands in the container on the host. 71 | 72 | ## bash or zsh 73 | 74 | Place this in your `~/.profile`: 75 | 76 | ```shell 77 | command_not_found_handle() { 78 | # don't run if not in a container 79 | if [ ! -e /run/.containerenv ] && [ ! -e /.dockerenv ]; then 80 | exit 127 81 | fi 82 | 83 | distrobox-host-exec "${@}" 84 | } 85 | if [ -n "${ZSH_VERSION-}" ]; then 86 | command_not_found_handler() { 87 | command_not_found_handle "$@" 88 | } 89 | fi 90 | ``` 91 | 92 | And then, run `source ~/.profile` to reload `.profile` in the current session. 93 | 94 | ## fish 95 | 96 | Place this snippet in a new fish function file (`~/.config/fish/functions/fish_command_not_found.fish`): 97 | 98 | ```fish 99 | function fish_command_not_found 100 | # "In a container" check 101 | if test -e /run/.containerenv -o -e /.dockerenv 102 | distrobox-host-exec $argv 103 | else 104 | __fish_default_command_not_found_handler $argv 105 | end 106 | end 107 | ``` 108 | 109 | And restart your terminal. Now when a command does not exist on your container, 110 | it will be automatically executed back on the host: 111 | 112 | ```shell 113 | user@fedora-distrobox:~$ which podman 114 | /usr/bin/which: no podman in [...] 115 | user@fedora-distrobox:~$ podman version # <-- this is automatically executed on host. 116 | Client: 117 | Version: 3.4.2 118 | API Version: 3.4.2 119 | Go Version: go1.16.6 120 | Built: Thu Jan 1 01:00:00 1970 121 | OS/Arch: linux/amd64 122 | 123 | Server: 124 | Version: 3.4.2 125 | API Version: 3.4.2 126 | Go Version: go1.16.6 127 | Built: Thu Jan 1 01:00:00 1970 128 | OS/Arch: linux/amd64 129 | ``` 130 | 131 | This is also useful to open `code`, `xdg-open`, or `flatpak` from within the container 132 | seamlessly. 133 | -------------------------------------------------------------------------------- /docs/posts/install_lilipod_static.md: -------------------------------------------------------------------------------- 1 | # Install Lilipod in a static manner 2 | 3 | If on your distribution (eg. SteamOS) can be difficult to install something and keep it 4 | between updates, then you could use this guide to install [lilipod](https://github.com/89luca89/lilipod) in your `$HOME`. 5 | 6 | [Lilipod](https://github.com/89luca89/lilipod) is a very simple container manager with minimal features to: 7 | 8 | - Download and manager images 9 | - Create and run containers 10 | 11 | To install `lilipod`: 12 | 13 | 1. Add the Path you've chosen to install to your PATH (by default it's `$HOME/.local/bin`. 14 | - [See here how to do it](https://www.howtogeek.com/658904/how-to-add-a-directory-to-your-path-in-linux/) 15 | 2. Ensure you have /etc/subuid and /etc/subgid, if you don't do: 16 | - `sudo touch /etc/subuid /etc/subgid` 17 | - `sudo usermod --add-subuid 100000-165535 --add-subgid 100000-165535 $USER` 18 | 19 | This is particularly indicated also for completely *sudoless* setups, where you don't 20 | have any superuser access to the system, like for example company provided computers. 21 | 22 | Download the latest release of [lilipod](https://github.com/89luca89/lilipod/releases) 23 | and put it somewhere in your $PATH 24 | 25 | Provided the only dependency on the host (`newuidmap/newgidmap`, of the package `uidmap` or `shadow`), 26 | you should be good to go. 27 | 28 | To uninstall, just delete the binary. 29 | -------------------------------------------------------------------------------- /docs/posts/install_podman_static.md: -------------------------------------------------------------------------------- 1 | # Install Podman in a static manner 2 | 3 | If on your distribution (eg. SteamOS) can be difficult to install something and keep it 4 | between updates, then you could use this guide to install `podman` in your `$HOME`. 5 | 6 | 1. Add the Path you've chosen to install to your PATH (by default it's `$HOME/.local/bin`. 7 | - [See here how to do it](https://www.howtogeek.com/658904/how-to-add-a-directory-to-your-path-in-linux/) 8 | 2. Ensure you have /etc/subuid and /etc/subgid, if you don't do: 9 | - `sudo touch /etc/subuid /etc/subgid` 10 | - `sudo usermod --add-subuid 100000-165535 --add-subgid 100000-165535 $USER` 11 | 12 | This is particularly indicated also for completely *sudoless* setups, where you don't 13 | have any superuser access to the system, like for example company provided computers. 14 | 15 | Download the latest release of [podman-launcher](https://github.com/89luca89/podman-launcher/releases), 16 | make it executable and put it somewhere in your $PATH 17 | 18 | Provided the only dependency on the host (`newuidmap/newgidmap`, of the package `uidmap` or `shadow`), 19 | you should be good to go. 20 | 21 | To uninstall, just delete the binary. 22 | -------------------------------------------------------------------------------- /docs/posts/integrate_vscode_distrobox.md: -------------------------------------------------------------------------------- 1 | - [Distrobox](../README.md) 2 | - [Integrate VSCode and Distrobox](#integrate-vscode-and-distrobox) 3 | - [From distrobox](#from-distrobox) 4 | - [From flatpak](#from-flatpak) 5 | - [First step, install it](#first-step-install-it) 6 | - [Second step, extensions](#second-step-extensions) 7 | - [Third step, podman wrapper](#third-step-podman-wrapper) 8 | - [Final Result](#final-result) 9 | 10 | --- 11 | 12 | # Integrate VSCode and Distrobox 13 | 14 | VScode doesn't need presentations, and it's a powerful tool for development. 15 | You may want to use it, but how to handle the dualism between host and container? 16 | 17 | In this experiment we will use [VSCodium](https://vscodium.com/) as an opensource 18 | alternative to VSCode. 19 | 20 | Here are a couple of solutions. 21 | 22 | ## From distrobox 23 | 24 | Well, you could just install VSCode in your Distrobox of choice, and export it! 25 | 26 | For example using an Arch Linux container: 27 | 28 | ```shell 29 | ~$ distrobox create --image archlinux:latest --name arch-distrobox 30 | ~$ distrobox enter --name arch-distrobox 31 | user@arch-distrobox:~$ 32 | ``` 33 | 34 | Download the deb file 35 | [HERE](https://github.com/VSCodium/vscodium/releases), or in Arch case just install 36 | 37 | ```shell 38 | user@arch-distrobox:~$ sudo pacman -S code 39 | ``` 40 | 41 | Now that we have installed it, we can export it: 42 | 43 | ```shell 44 | user@ubuntu-distrobox:~$ distrobox-export --app code 45 | ``` 46 | 47 | And that's really it, you'll have VSCode in your app list, and it will run from 48 | the Distrobox itself, so it will have access to all the software and tools inside 49 | it without problems. 50 | 51 | ![image](https://user-images.githubusercontent.com/598882/149206335-1a2d0edd-8b2f-437d-aae0-44b9723d2c30.png) 52 | ![image](https://user-images.githubusercontent.com/598882/149206414-56bdbc5a-3728-45ef-8dd4-2e168a0d7ccc.png) 53 | 54 | ## From flatpak 55 | 56 | Alternatively you may want to install VSCode on your host. We will explore how 57 | to integrate VSCode installed via **Flatpak** with Distrobox. 58 | 59 | For this one you'll need to use VSCode from Microsoft, and not VSCodium, in order 60 | to have access to the remote containers extension. 61 | 62 | ### First step install it 63 | 64 | ```shell 65 | ~$ flatpak install --user app/com.visualstudio.code 66 | ``` 67 | 68 | ### Second step, extensions 69 | 70 | Now we want to install VSCode [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) 71 | 72 | ![image](https://user-images.githubusercontent.com/598882/149207447-76a82e91-dd3f-43fa-8c52-9c2e85ae8fee.png) 73 | 74 | ### Third step podman wrapper 75 | 76 | Being in a Flatpak, we will need access to host's `podman` to be 77 | able to use the containers. Place this in your `~/.local/bin/podman-host` 78 | In case of access to host's `docker` to be 79 | able to use the containers, use `~/.local/bin/docker-host` 80 | 81 | For podman: 82 | 83 | ```shell 84 | curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/podman-host -o ~/.local/bin/podman-host 85 | chmod +x ~/.local/bin/podman-host 86 | ``` 87 | 88 | For docker: 89 | 90 | ```shell 91 | curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/docker-host -o ~/.local/bin/docker-host 92 | chmod +x ~/.local/bin/docker-host 93 | ``` 94 | 95 | Open VSCode settings (Ctrl+,) and head to `Remote>Containers>Docker Path` and 96 | set it to the path of `/home//.local/bin/podman-host` (or docker-host in case of docker), like in the example 97 | 98 | ![image](https://user-images.githubusercontent.com/598882/149208525-5ad630c9-fcbc-4ee6-9d77-e50d2c782a56.png) 99 | 100 | This will give a way to execute host's container manager from within the 101 | flatpak app. 102 | 103 | **This works for Distrobox both inside and outside a flatpak** 104 | This will act only for containers created with Distrobox, you can still use regular devcontainers 105 | without transparently if needed. 106 | 107 | ## Final Result 108 | 109 | After that, we're good to go! Open VSCode and Attach to Remote Container: 110 | 111 | ![image](https://user-images.githubusercontent.com/598882/149210561-2f1839ae-9a57-42fc-a122-21652588e327.png) 112 | 113 | And let's choose our Distrobox 114 | 115 | ![image](https://user-images.githubusercontent.com/598882/149210690-8bcb9a0d-1dc5-4937-9494-8c6aa6b26fd5.png) 116 | 117 | And we're good to go! We have our VSCode remote session inside our Distrobox container! 118 | 119 | ![image](https://user-images.githubusercontent.com/598882/149210881-749a8146-c69d-4382-bbef-91e4b477b7ba.png) 120 | 121 | # Open VSCode directly attached to our Distrobox 122 | 123 | You may want to instead have a more direct way to launch your VSCode when you're already in your project directory, 124 | in this case you can use `vscode-distrobox` script: 125 | 126 | ```shell 127 | curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/vscode-distrobox -o ~/.local/bin/vscode-distrobox 128 | chmod +x ~/.local/bin/vscode-distrobox 129 | ``` 130 | 131 | This will make it easy to launch VSCode attached to target distrobox, on a target path: 132 | 133 | `vscode-distrobox my-distrobox /path/to/project` 134 | -------------------------------------------------------------------------------- /docs/posts/posts.md: -------------------------------------------------------------------------------- 1 | - [Distrobox](../README.md) 2 | 3 | --- 4 | 5 | ## Latest posts 6 | 7 | - [Execute a command on the Host](execute_commands_on_host.md) 8 | - [Install Podman in HOME](install_podman_static.md) 9 | - [Install Lilipod in HOME](install_lilipod_static.md) 10 | - [Install on Steamdeck](steamdeck_guide.md) 11 | - [Integrate VSCode and Distrobox](integrate_vscode_distrobox.md) 12 | - [Run Libvirt using distrobox](run_libvirt_in_distrobox.md) 13 | - [Run latest GNOME and KDE Plasma using distrobox](run_latest_gnome_kde_on_distrobox.md) 14 | -------------------------------------------------------------------------------- /docs/posts/run_libvirt_in_distrobox.md: -------------------------------------------------------------------------------- 1 | - [Distrobox](../README.md) 2 | - [Run Libvirt using distrobox](run_libvirt_in_distrobox.md) 3 | - [Prepare the container](#prepare-the-container) 4 | - [Launch from the container](#launch-from-the-container) 5 | - [Connect via SSH](#connect-via-ssh) 6 | 7 | # Using an immutable distribution 8 | 9 | If you are on an immutable distribution (Silverblue/Kionite, Aeon/Kalpa) chances are that 10 | installing lots and lots of packages on the base system is not advisable. 11 | 12 | One way is to use a distrobox for them. 13 | 14 | ## Prepare the container 15 | 16 | To run libvirt/qemu/kvm we need a systemd container and we need a **rootful** container 17 | to be able to use it, see [this tip](../useful_tips.md#using-init-system-inside-a-distrobox) 18 | to have a list of compatible images. 19 | We will use in this example OpenSUSE's dedicated distrobox image: 20 | 21 | Assembly file: 22 | 23 | ```ini 24 | [libvirt] 25 | image=registry.opensuse.org/opensuse/distrobox:latest 26 | pull=true 27 | init=true 28 | root=true 29 | entry=true 30 | start_now=false 31 | unshare_all=true 32 | additional_packages="systemd" 33 | # Basic utilities for terminal use 34 | init_hooks="zypper in -y --no-recommends openssh-server patterns-server-kvm_server patterns-server-kvm_tools qemu-arm qemu-ppc qemu-s390x qemu-extra qemu-linux-user qemu-hw-display-virtio-gpu-pci qemu-hw-display-virtio-gpu" 35 | init_hooks="systemctl enable sshd.service" 36 | init_hooks="systemctl enable virtqemud.socket virtnetworkd.socket virtstoraged.socket virtnodedevd.socket" 37 | # Add the default user to the libvirt group 38 | init_hooks="usermod -aG libvirt ${USER}" 39 | # Expose container ssh on host 40 | additional_flags="-p 2222:22" 41 | # Export virt-manager 42 | exported_apps="virt-manager" 43 | ``` 44 | 45 | Alternatively, command line: 46 | 47 | ```console 48 | distrobox create --pull --root --init --unshare-all --image registry.opensuse.org/opensuse/distrobox:latest --name libvirtd --additional-flags "-p 2222:22" \ 49 | --init-hooks "zypper in -y --no-recommends openssh-server patterns-server-kvm_server patterns-server-kvm_tools qemu-arm qemu-ppc qemu-s390x qemu-extra qemu-linux-user qemu-hw-display-virtio-gpu-pci qemu-hw-display-virtio-gpu && systemctl enable sshd.service && systemctl enable virtqemud.socket virtnetworkd.socket virtstoraged.socket virtnodedevd.socket && usermod -aG libvirt $USER" 50 | 51 | distrobox-enter --root libvirtd -- distrobox-export --app virt-manager 52 | ``` 53 | 54 | ## Launch from the container 55 | 56 | Simply select the `Virt Manager (on libvirt)` entry in your menu, entry your root password and you're done! 57 | 58 | ![image](https://github.com/89luca89/distrobox/assets/598882/ca4f8fed-c8bd-4a01-b845-48be1aafd523) 59 | ![image](https://github.com/89luca89/distrobox/assets/598882/2f709b1b-f0e6-451a-8b59-3ed3177b9fcf) 60 | ![image](https://github.com/89luca89/distrobox/assets/598882/3f5f36cf-749d-4832-93f0-8eb9574dea9a) 61 | 62 | ## Connect via SSH 63 | 64 | You can alternatively connect from an existing VirtManager 65 | 66 | Now you will need to **Add a connection**: 67 | 68 | ![image](https://user-images.githubusercontent.com/598882/208441337-4dbade85-4c72-4342-b9ee-acd76b9b1675.png) 69 | 70 | Then set it like this: 71 | 72 | ![Screenshot from 2024-02-19 19-50-04](https://github.com/89luca89/distrobox/assets/598882/bff78725-63c9-4da6-9d25-318c58162673) 73 | 74 | - Tick the "Use ssh" option 75 | - username: `` 76 | - hostname: 127.0.0.1:2222 77 | 78 | Optionally you can set it to autoconnect. 79 | 80 | Now you can simply double click the connection to activate it, you'll be prompted 81 | with your password, insert the same password as the host: 82 | 83 | ![image](https://github.com/89luca89/distrobox/assets/598882/27bba705-223f-4876-a2fc-b6d102b7130a) 84 | 85 | And you should be good to go! 86 | 87 | ![image](https://user-images.githubusercontent.com/598882/208442009-fe9df606-e6a8-44f9-94c2-1c2bfba4ca15.png) 88 | -------------------------------------------------------------------------------- /docs/posts/steamdeck_guide.md: -------------------------------------------------------------------------------- 1 | Latest SteamOS (version 3.5 and later) already pre-installed `distrobox` and `podman`. 2 | 3 | Before using `distrobox` on SteamOS, it may be necessary to upgrade to the latest version since the version provided by 4 | SteamOS may be outdated. You can verify the currently installed version by running the command `distrobox version`. For 5 | instance, on SteamOS 3.5, version 1.4.2.1-3 of `distrobox` is installed. 6 | 7 | To upgrade `distrobox` on SteamOS, you have two options: 8 | 9 | ### Option 1: Install `distrobox` in `$HOME` 10 | 11 | By installing `distrobox` in your `$HOME` directory, you can ensure that you have control over the version you're using, 12 | independent of SteamOS updates. This method prevents your modifications from being reverted when SteamOS is updated. 13 | 14 | Note that it's essential to add this new version of `distrobox` to your PATH to ensure it's utilized over the 15 | SteamOS-provided version. 16 | 17 | To install `distrobox` in the `$HOME` directory, run the following command: 18 | 19 | ```sh 20 | curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix $HOME 21 | ``` 22 | 23 | For more detailed installation instructions, refer to the documentation 24 | [here](https://github.com/89luca89/distrobox/blob/main/docs/README.md#alternative-methods). 25 | 26 | To upgrade the version of `distrobox`, follow the instructions provided in the documentation link above. 27 | 28 | ### Option 2: Overwrite the provided `distrobox` installation in SteamOS 29 | 30 | An alternative approach is to upgrade the version of `distrobox` provided by SteamOS. While this simplifies management 31 | as you don't need to modify your PATH and you wouldn't have 2 versions of `distrobox` installed, it comes with the 32 | downside that your upgrades will be overwritten when SteamOS is updated. 33 | 34 | To upgrade the `distrobox` version provided by SteamOS, execute the following commands: 35 | 36 | ```sh 37 | sudo steamos-readonly disable 38 | curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --prefix /usr 39 | sudo steamos-readonly enable 40 | ``` 41 | 42 | Please note that disabling the read-only state is necessary to perform this upgrade. You can find more information about 43 | this requirement [here](https://help.steampowered.com/en/faqs/view/671A-4453-E8D2-323C). 44 | 45 | Once `distrobox` is upgraded, you can use it as normal. 46 | 47 | --- 48 | 49 | To run GUI application, add following line to `~/.distroboxrc`. 50 | 51 | ```sh 52 | xhost +si:localuser:$USER >/dev/null 53 | ``` 54 | 55 | This is needed to ensure the graphical apps can talk to the Xwayland session. 56 | 57 | You can now start using `distrobox` on the deck, open the terminal and go: 58 | 59 | ```sh 60 | distrobox create && distrobox enter 61 | ``` 62 | 63 | Refer to the [quickstart guide](../README.md#quick-start) and to the [usage docs](../usage/usage.md) 64 | And don't forget the [useful tips](../useful_tips.md)! 65 | 66 | ## SteamOS 3.4 and earlier 67 | 68 | To install Distrobox on the steamdeck, we can install both `podman` and `distrobox` 69 | inside the `$HOME` so that containers will survive updates. 70 | 71 | ## Install Podman 72 | 73 | To install podman, [refer to the install guide](./install_podman_static.md): 74 | 75 | - Download the latest release of `podman-launcher` and place it in your home and rename it to `podman`, 76 | this example will use `~/.local/bin` 77 | - Make the `podman` binary executable: 78 | - `chmod +x ~/.local/bin/podman` 79 | - Setup `deck` user password using: 80 | - `passwd` 81 | - Setup `deck` user uidmap: 82 | - `sudo touch /etc/subuid /etc/subgid` 83 | - `sudo usermod --add-subuid 100000-165535 --add-subgid 100000-165535 deck` 84 | 85 | And `podman` is ready to use! 86 | 87 | ### Alternative Install Lilipod 88 | 89 | To install [lilipod](https://github.com/89luca89/lilipod), [refer to the install guide](install_lilipod_static.md#): 90 | 91 | - Download the latest release of `lilipod` and place it in your home and rename it to `lilipod`, 92 | this example will use `~/.local/bin` 93 | - Setup `deck` user password using: 94 | - `passwd` 95 | - Setup `deck` user uidmap: 96 | - `sudo touch /etc/subuid /etc/subgid` 97 | - `sudo usermod --add-subuid 100000-165535 --add-subgid 100000-165535 deck` 98 | 99 | And `lilipod` is ready to use! 100 | 101 | ## Install Distrobox 102 | 103 | Installing distrobox in HOME is quite straightforward: 104 | 105 | - Install `distrobox` in your HOME following the `curl` instructions: 106 | - [INSTALL](../README.md#curl-or-wget) 107 | 108 | ## Setup ~/.distroboxrc 109 | 110 | We need to add some tweaks to our `~/.distroboxrc` to have GUI and Audio working 111 | correctly in SteamOS 112 | 113 | Ensure your `~/.distroboxrc` has this content: 114 | 115 | ```sh 116 | xhost +si:localuser:$USER >/dev/null 117 | export PIPEWIRE_RUNTIME_DIR=/dev/null 118 | export PATH=$PATH:$HOME/.local/bin 119 | ``` 120 | 121 | This will force the use of `pulseaudio` inside the container, right now `pipewire` 122 | is not working correctly inside the container, and it's a SteamOS specific issue. 123 | 124 | `xhost` is needed to ensure the graphical apps can talk to the Xwayland session. 125 | 126 | `PATH` is needed to ensure distrobox can find the `podman` binary we previously 127 | downloaded. 128 | 129 | ## Start using it 130 | 131 | You can now start using `distrobox` on the deck, open the terminal and go: 132 | 133 | `distrobox create && distrobox enter` 134 | 135 | Refer to the [quickstart guide](../README.md#quick-start) and to the [usage docs](../usage/usage.md) 136 | And don't forget the [useful tips](../useful_tips.md)! 137 | -------------------------------------------------------------------------------- /docs/usage/distrobox-enter.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox enter 5 | distrobox-enter 6 | 7 | # DESCRIPTION 8 | 9 | distrobox-enter takes care of entering the container with the name specified. 10 | Default command executed is your SHELL, but you can specify different shells or 11 | entire commands to execute. 12 | If using it inside a script, an application, or a service, you can specify the 13 | --headless mode to disable tty and interactivity. 14 | 15 | # SYNOPSIS 16 | 17 | **distrobox enter** 18 | 19 | --name/-n: name for the distrobox default: my-distrobox 20 | --/-e: end arguments execute the rest as command to execute at login default: default ${USER}'s shell 21 | --no-tty/-T: do not instantiate a tty 22 | --no-workdir/-nw: always start the container from container's home directory 23 | --additional-flags/-a: additional flags to pass to the container manager command 24 | --help/-h: show this message 25 | --root/-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 26 | way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary, 27 | specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable) 28 | --dry-run/-d: only print the container manager command generated 29 | --verbose/-v: show more verbosity 30 | --version/-V: show version 31 | 32 | # EXAMPLES 33 | 34 | Enter a distrobox named "example" 35 | 36 | distrobox-enter example 37 | 38 | Enter a distrobox specifying a command 39 | 40 | distrobox-enter --name fedora-toolbox-35 -- bash -l 41 | distrobox-enter my-alpine-container -- sh -l 42 | 43 | Use additional podman/docker/lilipod flags while entering a distrobox 44 | 45 | distrobox-enter --additional-flags "--preserve-fds" --name test -- bash -l 46 | 47 | Specify additional environment variables while entering a distrobox 48 | 49 | distrobox-enter --additional-flags "--env MY_VAR=value" --name test -- bash -l 50 | MY_VAR=value distrobox-enter --additional-flags "--preserve-fds" --name test -- bash -l 51 | 52 | You can also use environment variables to specify container manager and container name: 53 | 54 | DBX_CONTAINER_MANAGER="docker" DBX_CONTAINER_NAME=test-alpine distrobox-enter 55 | 56 | # ENVIRONMENT VARIABLES 57 | 58 | DBX_CONTAINER_NAME 59 | DBX_CONTAINER_MANAGER 60 | DBX_SKIP_WORKDIR 61 | DBX_SUDO_PROGRAM 62 | 63 | # EXTRA 64 | 65 | This command is used to enter the distrobox itself. Personally, I just create multiple profiles in 66 | my `gnome-terminal` to have multiple distros accessible. 67 | 68 | The `--additional-flags` or `-a` is useful to modify default command when executing in the container. 69 | For example: 70 | 71 | distrobox enter -n dev-arch --additional-flags "--env my_var=test" -- printenv &| grep my_var 72 | my_var=test 73 | 74 | This is possible also using normal env variables: 75 | 76 | my_var=test distrobox enter -n dev-arch --additional-flags -- printenv &| grep my_var 77 | my_var=test 78 | 79 | If you'd like to enter a rootful container having distrobox use a program other than 'sudo' to 80 | run podman/docker/lilipod as root, such as 'pkexec' or 'doas', you may specify it with the 81 | `DBX_SUDO_PROGRAM` environment variable. For example, to use 'doas' to enter a rootful container: 82 | 83 | DBX_SUDO_PROGRAM="doas" distrobox enter -n container --root 84 | 85 | Additionally, in one of the config file paths that distrobox supports, such as `~/.distroboxrc`, 86 | you can also append the line `distrobox_sudo_program="doas"` (for example) to always run 87 | distrobox commands involving rootful containers using 'doas'. 88 | -------------------------------------------------------------------------------- /docs/usage/distrobox-ephemeral.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox ephemeral 5 | distrobox-ephemeral 6 | 7 | # DESCRIPTION 8 | 9 | distrobox-ephemeral creates a temporary distrobox that is automatically destroyed 10 | when the command is terminated. 11 | 12 | # SYNOPSIS 13 | 14 | **distrobox ephemeral** 15 | 16 | --root/-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 17 | way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary, 18 | specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable) 19 | --verbose/-v: show more verbosity 20 | --help/-h: show this message 21 | --/-e: end arguments execute the rest as command to execute at login default: default ${USER}'s shell 22 | --version/-V: show version 23 | 24 | # EXAMPLES 25 | 26 | distrobox-ephemeral --image alpine:latest -- cat /etc/os-release 27 | distrobox-ephemeral --root --verbose --image alpine:latest --volume /opt:/opt 28 | 29 | You can also use [flags from **distrobox-create**](distrobox-create.md) to customize the ephemeral container to run. 30 | 31 | # SEE ALSO 32 | 33 | distrobox-create --help 34 | man distrobox-create 35 | 36 | # ENVIRONMENT VARIABLES 37 | 38 | distrobox-ephemeral calls distrobox-create, SEE ALSO distrobox-create(1) for 39 | a list of supported environment variables to use. 40 | -------------------------------------------------------------------------------- /docs/usage/distrobox-export.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # NAME 4 | 5 | distrobox-export 6 | 7 | # DESCRIPTION 8 | 9 | **Application and binary exporting** 10 | 11 | distrobox-export takes care of exporting an app or a binary from the container 12 | to the host. 13 | 14 | The exported app will be easily available in your normal launcher and it will 15 | automatically be launched from the container it is exported from. 16 | 17 | # SYNOPSIS 18 | 19 | **distrobox-export** 20 | 21 | --app/-a: name of the application to export or absolute path to desktopfile to export 22 | --bin/-b: absolute path of the binary to export 23 | --list-apps: list applications exported from this container 24 | --list-binaries list binaries exported from this container, use -ep to specify custom paths to search 25 | --delete/-d: delete exported application or binary 26 | --export-label/-el: label to add to exported application name. 27 | Use "none" to disable. 28 | Defaults to (on \$container_name) 29 | --export-path/-ep: path where to export the binary 30 | --extra-flags/-ef: extra flags to add to the command 31 | --enter-flags/-nf: flags to add to distrobox-enter 32 | --sudo/-S: specify if the exported item should be run as sudo 33 | --help/-h: show this message 34 | --verbose/-v: show more verbosity 35 | --version/-V: show version 36 | 37 | You may want to install graphical applications or CLI tools in your distrobox. 38 | Using `distrobox-export` from **inside** the container will let you use them from the host itself. 39 | 40 | # EXAMPLES 41 | 42 | distrobox-export --app mpv [--extra-flags "flags"] [--delete] [--sudo] 43 | distrobox-export --bin /path/to/bin [--export-path ~/.local/bin] [--extra-flags "flags"] [--delete] [--sudo] 44 | 45 | **App export example** 46 | 47 | distrobox-export --app abiword 48 | 49 | This tool will simply copy the original `.desktop` files along with needed icons, 50 | add the prefix `/usr/local/bin/distrobox-enter -n distrobox_name -e ...` to the commands to run, and 51 | save them in your home to be used directly from the host as a normal app. 52 | 53 | distrobox-export --app /opt/application/my-app.desktop 54 | 55 | This will skip searching for the desktopfile in canonical paths, and just use the provided file path. 56 | 57 | **Binary export example** 58 | 59 | distrobox-export --bin /usr/bin/code --extra-flags "--foreground" --export-path $HOME/.local/bin 60 | 61 | In the case of exporting binaries, you will have to specify **where** to export it 62 | (`--export-path`) and the tool will create a little wrapper script that will 63 | `distrobox-enter -e` from the host, the desired binary. 64 | This can be handy with the use of `direnv` to have different versions of the same binary based on 65 | your `env` or project. 66 | 67 | The exported binaries will be exported in the "--export-path" of choice as a wrapper 68 | script that acts naturally both on the host and in the container. 69 | 70 | **Additional flags** 71 | 72 | You can specify additional flags to add to the command, for example if you want 73 | to export an electron app, you could add the "--foreground" flag to the command: 74 | 75 | distrobox-export --app atom --extra-flags "--foreground" 76 | distrobox-export --bin /usr/bin/vim --export-path ~/.local/bin --extra-flags "-p" 77 | 78 | This works for binaries and apps. 79 | Extra flags are only used then the exported app or binary is used from 80 | the host, using them inside the container will not include them. 81 | 82 | **Unexport** 83 | 84 | The option "--delete" will un-export an app or binary 85 | 86 | distrobox-export --app atom --delete 87 | distrobox-export --bin /usr/bin/vim --export-path ~/.local/bin --delete 88 | 89 | **Run as root in the container** 90 | 91 | The option "--sudo" will launch the exported item as root inside the distrobox. 92 | 93 | **Notes** 94 | 95 | Note you can use --app OR --bin but not together. 96 | 97 | ![app-export](https://user-images.githubusercontent.com/598882/144294795-c7785620-bf68-4d1b-b251-1e1f0a32a08d.png) 98 | 99 | NOTE: some electron apps such as vscode and atom need additional flags to work from inside the 100 | container, use the `--extra-flags` option to provide a series of flags, for example: 101 | 102 | `distrobox-export --app atom --extra-flags "--foreground"` 103 | -------------------------------------------------------------------------------- /docs/usage/distrobox-generate-entry.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox generate-entry 5 | 6 | # DESCRIPTION 7 | 8 | distrobox-generate-entry will create a desktop icon for one of the available distroboxes. 9 | This will be then deleted when you remove the matching distrobox. 10 | 11 | # SYNOPSIS 12 | 13 | **distrobox generate-entry** 14 | 15 | --help/-h: show this message 16 | --all/-a: perform for all distroboxes 17 | --delete/-d: delete the entry 18 | --icon/-i: specify a custom icon [/path/to/icon] (default auto) 19 | --root/-r: perform on rootful distroboxes 20 | --verbose/-v: show more verbosity 21 | --version/-V: show version 22 | 23 | # EXAMPLES 24 | 25 | Generate an entry for a container 26 | 27 | distrobox generate-entry my-container-name 28 | 29 | Specify a custom icon for the entry 30 | 31 | distrobox generate-entry my-container-name --icon /path/to/icon.png 32 | 33 | Generate an entry for all distroboxes 34 | 35 | distrobox generate-entry --all 36 | 37 | Delete an entry 38 | 39 | distrobox generate-entry container-name --delete 40 | -------------------------------------------------------------------------------- /docs/usage/distrobox-host-exec.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox-host-exec 5 | 6 | # DESCRIPTION 7 | 8 | distrobox-host-exec lets one execute command on the host, while inside of a container. 9 | 10 | Under the hood, distrobox-host-exec uses `host-spawn` a project that lets us 11 | execute commands back on the host. 12 | If the tool is not found the user will be prompted to install it. 13 | 14 | # SYNOPSIS 15 | 16 | Just pass to "distrobox-host-exec" any command and all its arguments, if any. 17 | 18 | --help/-h: show this message 19 | --verbose/-v: show more verbosity 20 | --version/-V: show version 21 | --yes/-Y: Automatically answer yes to prompt: 22 | host-spawn will be installed on the guest system 23 | if host-spawn is not detected. 24 | This behaviour is default when running in a non-interactive shell. 25 | 26 | If no command is provided, it will execute "$SHELL". 27 | 28 | Alternatively, use symlinks to make `distrobox-host-exec` execute as that command: 29 | 30 | ~$: ln -s /usr/bin/distrobox-host-exec /usr/local/bin/podman 31 | ~$: ls -l /usr/local/bin/podman 32 | lrwxrwxrwx. 1 root root 51 Jul 11 19:26 /usr/local/bin/podman -> /usr/bin/distrobox-host-exec 33 | ~$: podman version 34 | ...this is executed on host... 35 | 36 | # EXAMPLES 37 | 38 | distrobox-host-exec ls 39 | distrobox-host-exec bash -l 40 | distrobox-host-exec flatpak run org.mozilla.firefox 41 | distrobox-host-exec podman ps -a 42 | -------------------------------------------------------------------------------- /docs/usage/distrobox-init.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox-init 5 | 6 | # DESCRIPTION 7 | 8 | **Init the distrobox (not to be launched manually)** 9 | 10 | distrobox-init is the entrypoint of a created distrobox. 11 | Note that this HAS to run from inside a distrobox, will not work if you run it 12 | from your host. 13 | 14 | **This is not intended to be used manually, but instead used by distrobox-create 15 | to set up the container's entrypoint.** 16 | 17 | distrobox-init will take care of installing missing dependencies (eg. sudo), set 18 | up the user and groups, mount directories from the host to ensure the tight 19 | integration. 20 | 21 | # SYNOPSIS 22 | 23 | **distrobox-init** 24 | 25 | --name/-n: user name 26 | --user/-u: uid of the user 27 | --group/-g: gid of the user 28 | --home/-d: path/to/home of the user 29 | --help/-h: show this message 30 | --additional-packages: packages to install in addition 31 | --init/-I: whether to use or not init 32 | --pre-init-hooks: commands to execute prior to init 33 | --nvidia: try to integrate host's nVidia drivers in the guest 34 | --upgrade/-U: run init in upgrade mode 35 | --verbose/-v: show more verbosity 36 | --version/-V: show version 37 | --: end arguments execute the rest as command to execute during init 38 | 39 | # EXAMPLES 40 | 41 | distrobox-init --name test-user --user 1000 --group 1000 --home /home/test-user 42 | distrobox-init --upgrade 43 | -------------------------------------------------------------------------------- /docs/usage/distrobox-list.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox list 5 | distrobox-list 6 | 7 | # DESCRIPTION 8 | 9 | distrobox-list lists available distroboxes. It detects them and lists them separately 10 | from the rest of normal containers. 11 | 12 | # SYNOPSIS 13 | 14 | **distrobox list** 15 | 16 | --help/-h: show this message 17 | --no-color: disable color formatting 18 | --root/-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 19 | way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary, 20 | specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable) 21 | --verbose/-v: show more verbosity 22 | --version/-V: show version 23 | 24 | # EXAMPLES 25 | 26 | distrobox-list 27 | 28 | You can also use environment variables to specify container manager 29 | 30 | DBX_CONTAINER_MANAGER="docker" distrobox-list 31 | 32 | # ENVIRONMENT VARIABLES 33 | 34 | DBX_CONTAINER_MANAGER 35 | DBX_SUDO_PROGRAM 36 | 37 | ![image](https://user-images.githubusercontent.com/598882/147831082-24b5bc2e-b47e-49ac-9b1a-a209478c9705.png) 38 | -------------------------------------------------------------------------------- /docs/usage/distrobox-rm.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox rm 5 | distrobox-rm 6 | 7 | # DESCRIPTION 8 | 9 | distrobox-rm delete one of the available distroboxes. 10 | 11 | # SYNOPSIS 12 | 13 | **distrobox rm** 14 | 15 | --all/-a: delete all distroboxes 16 | --force/-f: force deletion 17 | --rm-home: remove the mounted home if it differs from the host user's one 18 | --root/-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 19 | way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary, 20 | specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable) 21 | --help/-h: show this message 22 | --verbose/-v: show more verbosity 23 | --version/-V: show version 24 | 25 | # EXAMPLES 26 | 27 | distrobox-rm container-name [--force] [--all] 28 | 29 | You can also use environment variables to specify container manager and name: 30 | 31 | DBX_CONTAINER_MANAGER="docker" DBX_CONTAINER_NAME=test-alpine distrobox-rm 32 | 33 | # ENVIRONMENT VARIABLES 34 | 35 | DBX_CONTAINER_MANAGER 36 | DBX_CONTAINER_NAME 37 | DBX_NON_INTERACTIVE 38 | DBX_SUDO_PROGRAM 39 | -------------------------------------------------------------------------------- /docs/usage/distrobox-stop.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox stop 5 | distrobox-stop 6 | 7 | # DESCRIPTION 8 | 9 | distrobox-stop stop a running distrobox. 10 | 11 | Distroboxes are left running, even after exiting out of them, so that 12 | subsequent enters are really quick. This is how they can be stopped. 13 | 14 | # SYNOPSIS 15 | 16 | **distrobox stop** 17 | 18 | --all/-a: stop all distroboxes 19 | --yes/-Y: non-interactive, stop without asking 20 | --help/-h: show this message 21 | --root/-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 22 | way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary, 23 | specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable) 24 | --verbose/-v: show more verbosity 25 | --version/-V: show version 26 | 27 | # EXAMPLES 28 | 29 | distrobox-stop container-name1 container-name2 30 | distrobox-stop container-name 31 | distrobox-stop --all 32 | 33 | You can also use environment variables to specify container manager and name: 34 | 35 | DBX_CONTAINER_MANAGER="docker" DBX_CONTAINER_NAME=test-alpine distrobox-stop 36 | 37 | # ENVIRONMENT VARIABLES 38 | 39 | DBX_CONTAINER_MANAGER 40 | DBX_CONTAINER_NAME 41 | DBX_NON_INTERACTIVE 42 | DBX_SUDO_PROGRAM 43 | -------------------------------------------------------------------------------- /docs/usage/distrobox-upgrade.md: -------------------------------------------------------------------------------- 1 | 2 | # NAME 3 | 4 | distrobox-upgrade 5 | 6 | # DESCRIPTION 7 | 8 | distrobox-upgrade will enter the specified list of containers and will perform 9 | an upgrade using the container's package manager. 10 | 11 | # SYNOPSIS 12 | 13 | **distrobox upgrade** 14 | 15 | --help/-h: show this message 16 | --all/-a: perform for all distroboxes 17 | --running: perform only for running distroboxes 18 | --root/-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 19 | way over "sudo distrobox" (note: if using a program other than 'sudo' for root privileges is necessary, 20 | specify it through the DBX_SUDO_PROGRAM env variable, or 'distrobox_sudo_program' config variable) 21 | --verbose/-v: show more verbosity 22 | --version/-V: show version 23 | 24 | # EXAMPLES 25 | 26 | Upgrade all distroboxes 27 | 28 | distrobox-upgrade --all 29 | 30 | Upgrade all running distroboxes 31 | 32 | distrobox-upgrade --all --running 33 | 34 | Upgrade a specific distrobox 35 | 36 | distrobox-upgrade alpine-linux 37 | 38 | Upgrade a list of distroboxes 39 | 40 | distrobox-upgrade alpine-linux ubuntu22 my-distrobox123 41 | 42 | **Automatically update all distro** 43 | 44 | You can create a systemd service to perform distrobox-upgrade automatically, 45 | this example shows how to run it daily: 46 | 47 | ~/.config/systemd/user/distrobox-upgrade.service 48 | 49 | [Unit] 50 | Description=distrobox-upgrade Automatic Update 51 | 52 | [Service] 53 | Type=simple 54 | ExecStart=distrobox-upgrade --all 55 | StandardOutput=null 56 | 57 | ~/.config/systemd/user/distrobox-upgrade.timer 58 | 59 | [Unit] 60 | Description=distrobox-upgrade Automatic Update Trigger 61 | 62 | [Timer] 63 | OnBootSec=1h 64 | OnUnitInactiveSec=1d 65 | 66 | [Install] 67 | WantedBy=timers.target 68 | 69 | Then simply do a `systemctl --user daemon-reload && systemctl --user enable --now distrobox-upgrade.timer` 70 | -------------------------------------------------------------------------------- /docs/usage/usage.md: -------------------------------------------------------------------------------- 1 | 2 | - [Distrobox](../README.md) 3 | - [Outside the distrobox](#outside-the-distrobox) 4 | - [distrobox-assemble](distrobox-assemble.md) 5 | - [distrobox-create](distrobox-create.md) 6 | - [distrobox-enter](distrobox-enter.md) 7 | - [distrobox-ephemeral](distrobox-ephemeral.md) 8 | - [distrobox-list](distrobox-list.md) 9 | - [distrobox-rm](distrobox-rm.md) 10 | - [distrobox-stop](distrobox-stop.md) 11 | - [distrobox-upgrade](distrobox-upgrade.md) 12 | - [distrobox-generate-entry](distrobox-generate-entry.md) 13 | - [Inside the distrobox](#inside-the-distrobox) 14 | - [distrobox-export](distrobox-export.md) 15 | - [distrobox-host-exec](distrobox-host-exec.md) 16 | - [distrobox-init](distrobox-init.md) 17 | -------------------------------------------------------------------------------- /extras/distrobox-example-manifest.ini: -------------------------------------------------------------------------------- 1 | # This is an example assemble file to show how options are laid out 2 | # You generally have a section header, followed by options so: 3 | # 4 | # [name-of-your-container] 5 | # additional_flags="" 6 | # additional_packages="" 7 | # entry="" 8 | # home="" 9 | # image="" 10 | # start_now="" 11 | # init="" 12 | # init_hooks="" 13 | # nvidia="" 14 | # pre_init_hooks="" 15 | # pull="" 16 | # root="" 17 | # unshare_ipc="" 18 | # unshare_netns="" 19 | # volume="" 20 | # 21 | ############################################################################### 22 | 23 | [ generic1] 24 | unshare_netns=true 25 | unshare_ipc=true 26 | 27 | # This is a comment! 28 | # you can put them how you like 29 | 30 | [generic2] 31 | # Comment 32 | additional_packages="git vim tmux" 33 | # this will enable nvidia driver integration 34 | nvidia=true 35 | 36 | [generic3] # Comment also here 37 | additional_packages="git vim tmux" # Comment 38 | home=/tmp/home 39 | 40 | [arch] 41 | additional_packages="git vim tmux nodejs" 42 | # lines with spaces, wants quotes 43 | home=/tmp/home 44 | image=archlinux:latest 45 | init=false 46 | init_hooks="touch /init-normal" 47 | pre_init_hooks="touch /pre-init" 48 | pull=true 49 | root=false 50 | volume=/tmp/test:/run/a /tmp/test:/run/b 51 | unshare_netns=true 52 | unshare_ipc=true 53 | # We can choose to start the container immediately, it's off by default 54 | start_now=true 55 | 56 | ############################################################################### 57 | # A more complex example now 58 | ############################################################################## 59 | [tumbleweed_distrobox] 60 | image=registry.opensuse.org/opensuse/distrobox 61 | pull=true 62 | # Basic utilities for terminal use 63 | additional_packages="acpi bash-completion findutils iproute iputils sensors inotify-tools unzip" 64 | additional_packages="net-tools nmap openssl procps psmisc rsync man tig tmux tree vim htop xclip yt-dlp" 65 | # Development packages 66 | additional_packages="git git-credential-libsecret" 67 | additional_packages="patterns-devel-base-devel_basis" 68 | additional_packages="ShellCheck ansible-lint clang clang-tools codespell ctags desktop-file-utils gcc golang jq python3" 69 | additional_packages="python3-bashate python3-flake8 python3-mypy python3-pipx python3-pycodestyle python3-pyflakes python3-pylint python3-python-lsp-server python3-rstcheck python3-yapf python3-yamllint rustup shfmt" 70 | # Gotta work 71 | additional_packages="kubernetes-client helm" 72 | # Setup golang stuff 73 | init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest; 74 | init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install github.com/onsi/ginkgo/v2/ginkgo@latest; 75 | init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install golang.org/x/tools/cmd/goimports@latest; 76 | init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install golang.org/x/tools/gopls@latest; 77 | init_hooks=GOPATH="${HOME}/.local/share/system-go" GOBIN=/usr/local/bin go install sigs.k8s.io/kind@latest; 78 | # Add some useful commands from host, to the guest 79 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/conmon; 80 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/crun; 81 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker; 82 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose; 83 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/flatpak; 84 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/podman; 85 | init_hooks=ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/xdg-open; 86 | exported_apps="htop" 87 | exported_bins="/usr/bin/htop /usr/bin/git" 88 | exported_bins_path="~/.local/bin" 89 | -------------------------------------------------------------------------------- /extras/docker-host: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | id="$(echo "$@" | grep -Eo ' [a-zA-Z0-9]{64} ' | tr -d ' ')" 4 | DOCKER_COMMAND="$(command -v docker 2> /dev/null)" 5 | ENV_COMMAND="printenv" 6 | 7 | # if we're in a flatpak, we fallback to host-spawn 8 | if [ -n "${FLATPAK_ID}" ]; then 9 | DOCKER_COMMAND="flatpak-spawn --host docker" 10 | ENV_COMMAND="flatpak-spawn --host printenv" 11 | fi 12 | 13 | # This little workaround is used to ensure 14 | # we use our distrobox to properly enter the container 15 | if echo "$@" | grep -q 'exec'; then 16 | # we do this procedure only for distroboxes 17 | # we will leave regular containers alone. 18 | if [ "$(${DOCKER_COMMAND} inspect --type container --format '{{ index .Config.Labels "manager" }}' "${id}")" = "distrobox" ]; then 19 | 20 | # Ensure that our distrobox containers will use different vscode-servers 21 | # by symlinking to different paths 22 | # This is necessary because vscode-server will always use $HOME/.vscode-server 23 | # so we're forced to do this workaround 24 | if [ -n "${id}" ]; then 25 | # shellcheck disable=SC2016 26 | ${DOCKER_COMMAND} exec -u "${USER}" "${id}" /bin/sh -c ' 27 | if [ ! -L "${HOME}/.vscode-server" ]; then 28 | [ -e "${HOME}/.vscode-server" ] && mv "${HOME}/.vscode-server" /var/tmp 29 | [ -d /var/tmp/.vscode-server ] || mkdir /var/tmp/.vscode-server 30 | ln -sf /var/tmp/.vscode-server "$HOME" 31 | elif [ ! -e "${HOME}/.vscode-server" ]; then 32 | mkdir /var/tmp/.vscode-server 33 | ln -sf /var/tmp/.vscode-server "$HOME" 34 | fi 35 | ' 36 | fi 37 | 38 | for i; do 39 | # interject root:root, we want to be our own user 40 | if echo "${i}" | grep -q "root:root"; then 41 | set -- "$@" "${USER}:${USER}" 42 | shift 43 | # inject host's environment 44 | elif echo "${i}" | grep -q "exec"; then 45 | set -- "$@" "exec" 46 | shift 47 | # inject host's environment 48 | for j in $(${ENV_COMMAND} | grep '=' | grep -Ev ' |"|`|\$' | 49 | # refer to distrobox-enter:L454 50 | grep -Ev '^(CONTAINER_ID|HOST|HOSTNAME|HOME|PATH|PROFILEREAD|SHELL|XDG_SEAT|XDG_VTNR|XDG_.*_DIRS|^_)'); do 51 | 52 | set -- "$@" "--env" 53 | set -- "$@" "${j}" 54 | done 55 | else 56 | set -- "$@" "${i}" 57 | shift 58 | fi 59 | done 60 | fi 61 | fi 62 | 63 | ${DOCKER_COMMAND} "$@" 64 | -------------------------------------------------------------------------------- /extras/install-podman: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SPDX-License-Identifier: GPL-3.0-only 3 | # 4 | # This file is part of the distrobox project: https://github.com/89luca89/distrobox 5 | # 6 | # Copyright (C) 2021 distrobox contributors 7 | # 8 | # distrobox is free software; you can redistribute it and/or modify it 9 | # under the terms of the GNU General Public License version 3 10 | # as published by the Free Software Foundation. 11 | # 12 | # distrobox is distributed in the hope that it will be useful, but 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | # General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with distrobox; if not, see . 19 | 20 | # POSIX 21 | 22 | echo "This script is deprecated and unsupported" 23 | echo "head over to:" 24 | echo "" 25 | echo "https://github.com/89luca89/distrobox/blob/main/docs/posts/install_podman_static.md" 26 | echo "or" 27 | echo "https://github.com/89luca89/distrobox/blob/main/docs/posts/install_lilipod_static.md" 28 | echo "" 29 | echo "for updated instructions on how to install podman-launcher" 30 | 31 | exit 1 32 | -------------------------------------------------------------------------------- /extras/podman-host: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | id="$(echo "$@" | grep -Eo ' [a-zA-Z0-9]{64} ' | tr -d ' ')" 4 | PODMAN_COMMAND="$(command -v podman 2> /dev/null)" 5 | ENV_COMMAND="printenv" 6 | 7 | # if we're in a flatpak, we fallback to host-spawn 8 | if [ -n "${FLATPAK_ID}" ]; then 9 | PODMAN_COMMAND="flatpak-spawn --host podman" 10 | ENV_COMMAND="flatpak-spawn --host printenv" 11 | fi 12 | 13 | # This little workaround is used to ensure 14 | # we use our distrobox to properly enter the container 15 | if echo "$@" | grep -q 'exec'; then 16 | # we do this procedure only for distroboxes 17 | # we will leave regular containers alone. 18 | if [ "$(${PODMAN_COMMAND} inspect --type container --format '{{ index .Config.Labels "manager" }}' "${id}")" = "distrobox" ]; then 19 | 20 | # Ensure that our distrobox containers will use different vscode-servers 21 | # by symlinking to different paths 22 | # This is necessary because vscode-server will always use $HOME/.vscode-server 23 | # so we're forced to do this workaround 24 | if [ -n "${id}" ]; then 25 | # shellcheck disable=SC2016 26 | ${PODMAN_COMMAND} exec -u "${USER}" "${id}" /bin/sh -c ' 27 | if [ ! -L "${HOME}/.vscode-server" ]; then 28 | [ -e "${HOME}/.vscode-server" ] && mv "${HOME}/.vscode-server" /var/tmp 29 | [ -d /var/tmp/.vscode-server ] || mkdir /var/tmp/.vscode-server 30 | ln -sf /var/tmp/.vscode-server "$HOME" 31 | elif [ ! -e "${HOME}/.vscode-server" ]; then 32 | mkdir /var/tmp/.vscode-server 33 | ln -sf /var/tmp/.vscode-server "$HOME" 34 | fi 35 | ' 36 | fi 37 | 38 | for i; do 39 | # interject root:root, we want to be our own user 40 | if echo "${i}" | grep -q "root:root"; then 41 | set -- "$@" "${USER}:${USER}" 42 | shift 43 | # inject host's environment 44 | elif echo "${i}" | grep -q "exec"; then 45 | set -- "$@" "exec" 46 | shift 47 | # inject host's environment 48 | for j in $(${ENV_COMMAND} | grep '=' | grep -Ev ' |"|`|\$' | 49 | # refer to distrobox-enter:L454 50 | grep -Ev '^(CONTAINER_ID|HOST|HOSTNAME|HOME|PATH|PROFILEREAD|SHELL|XDG_SEAT|XDG_VTNR|XDG_.*_DIRS|^_)'); do 51 | 52 | set -- "$@" "--env" 53 | set -- "$@" "${j}" 54 | done 55 | else 56 | set -- "$@" "${i}" 57 | shift 58 | fi 59 | done 60 | fi 61 | fi 62 | 63 | ${PODMAN_COMMAND} "$@" 64 | -------------------------------------------------------------------------------- /extras/vscode-distrobox: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | container_name="$(printf '{"containerName":"%s"}' "$1" | od -A n -t x1 | tr -d "\n\t ")" 4 | 5 | if command -v code 2> /dev/null > /dev/null; then 6 | code_command="code" 7 | elif flatpak list | grep -q com.visualstudio.code; then 8 | code_command="flatpak run com.visualstudio.code" 9 | else 10 | echo "vscode not installed" 11 | exit 127 12 | fi 13 | 14 | ${code_command} --folder-uri="vscode-remote://attached-container+${container_name}/$(realpath "${2}")" 15 | -------------------------------------------------------------------------------- /icons/hicolor/128x128/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/128x128/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/16x16/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/16x16/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/22x22/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/22x22/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/24x24/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/24x24/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/256x256/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/256x256/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/32x32/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/32x32/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/36x36/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/36x36/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/48x48/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/48x48/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/64x64/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/64x64/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/72x72/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/72x72/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/hicolor/96x96/apps/terminal-distrobox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/89luca89/distrobox/71cf8295fb74bb2805904cb3fb497556331ec169/icons/hicolor/96x96/apps/terminal-distrobox-icon.png -------------------------------------------------------------------------------- /icons/terminal-distrobox-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /man/gen-man: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if ! command -v pandoc; then 4 | echo ' 5 | Please install "pandoc". This tool is needed to convert markdown to man pages. 6 | This tool is needed to convert files under docs/usage into man pages for the 7 | installation. 8 | ' 9 | exit 1 10 | fi 11 | 12 | for i in "$(dirname "${0}")"/../docs/usage/distrobox*; do 13 | pandoc --standalone \ 14 | --metadata title="$(basename "${i}" | cut -d'.' -f1 | tr '[:lower:]' '[:upper:]')" \ 15 | --metadata section=1 \ 16 | --metadata header="User Manual" \ 17 | --metadata footer="Distrobox" \ 18 | --metadata date="$(date +"%b %Y")" \ 19 | --to man "${i}" \ 20 | -o "$(dirname "${0}")"/man1/out 21 | sed -i 's|\" Automatically generated by Pandoc.*||g' "$(dirname "${0}")"/man1/out 22 | mv "$(dirname "${0}")/man1/out" "$(dirname "${0}")/man1/$(basename "${i}" | sed 's|md|1|g')" 23 | done 24 | 25 | compatibility_file="$(mktemp --suffix='.md')" 26 | HEAD="$(grep -n -B1 "^# Compatibility" "$(dirname "${0}")/../docs/compatibility.md" | head -1 | tr -d '-')" 27 | START="$(grep -n "# Host Distros" "$(dirname "${0}")/../docs/compatibility.md" | cut -d":" -f1)" 28 | END="$(grep -n -B1 "# Containers Distros" "$(dirname "${0}")/../docs/compatibility.md" | head -1 | tr -d '-')" 29 | 30 | sed -e "${START},${END}d" "$(dirname "${0}")/../docs/compatibility.md" > "${compatibility_file}" 31 | sed -e "1,${HEAD}d" -i "${compatibility_file}" 32 | sed -i "s/^#.*/\U&/g" "${compatibility_file}" 33 | 34 | pandoc --standalone \ 35 | --metadata title="DISTROBOX" \ 36 | --metadata section=1 \ 37 | --metadata header="User Manual" \ 38 | --metadata footer="Distrobox" \ 39 | --metadata date="$(date +"%b %Y")" \ 40 | --to man "${compatibility_file}" \ 41 | -o "$(dirname "${0}")"/man1/out 42 | sed -i 's|\" Automatically generated by Pandoc.*||g' "$(dirname "${0}")"/man1/out 43 | mv "$(dirname "${0}")"/man1/out "$(dirname "${0}")"/man1/distrobox-compatibility.1 44 | 45 | cat "$(dirname "${0}")/man1/distrobox-"* > "$(dirname "${0}")/man1/distrobox.1" 46 | -------------------------------------------------------------------------------- /man/man1/distrobox-enter.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-ENTER" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox enter 8 | distrobox\-enter 9 | .EE 10 | .SH DESCRIPTION 11 | distrobox\-enter takes care of entering the container with the name 12 | specified. 13 | Default command executed is your SHELL, but you can specify different 14 | shells or entire commands to execute. 15 | If using it inside a script, an application, or a service, you can 16 | specify the \[en]headless mode to disable tty and interactivity. 17 | .SH SYNOPSIS 18 | \f[B]distrobox enter\f[R] 19 | .IP 20 | .EX 21 | \-\-name/\-n: name for the distrobox default: my\-distrobox 22 | \-\-/\-e: end arguments execute the rest as command to execute at login default: default ${USER}\[aq]s shell 23 | \-\-no\-tty/\-T: do not instantiate a tty 24 | \-\-no\-workdir/\-nw: always start the container from container\[aq]s home directory 25 | \-\-additional\-flags/\-a: additional flags to pass to the container manager command 26 | \-\-help/\-h: show this message 27 | \-\-root/\-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 28 | way over \[dq]sudo distrobox\[dq] (note: if using a program other than \[aq]sudo\[aq] for root privileges is necessary, 29 | specify it through the DBX_SUDO_PROGRAM env variable, or \[aq]distrobox_sudo_program\[aq] config variable) 30 | \-\-dry\-run/\-d: only print the container manager command generated 31 | \-\-verbose/\-v: show more verbosity 32 | \-\-version/\-V: show version 33 | .EE 34 | .SH EXAMPLES 35 | Enter a distrobox named \[lq]example\[rq] 36 | .IP 37 | .EX 38 | distrobox\-enter example 39 | .EE 40 | .PP 41 | Enter a distrobox specifying a command 42 | .IP 43 | .EX 44 | distrobox\-enter \-\-name fedora\-toolbox\-35 \-\- bash \-l 45 | distrobox\-enter my\-alpine\-container \-\- sh \-l 46 | .EE 47 | .PP 48 | Use additional podman/docker/lilipod flags while entering a distrobox 49 | .IP 50 | .EX 51 | distrobox\-enter \-\-additional\-flags \[dq]\-\-preserve\-fds\[dq] \-\-name test \-\- bash \-l 52 | .EE 53 | .PP 54 | Specify additional environment variables while entering a distrobox 55 | .IP 56 | .EX 57 | distrobox\-enter \-\-additional\-flags \[dq]\-\-env MY_VAR=value\[dq] \-\-name test \-\- bash \-l 58 | MY_VAR=value distrobox\-enter \-\-additional\-flags \[dq]\-\-preserve\-fds\[dq] \-\-name test \-\- bash \-l 59 | .EE 60 | .PP 61 | You can also use environment variables to specify container manager and 62 | container name: 63 | .IP 64 | .EX 65 | DBX_CONTAINER_MANAGER=\[dq]docker\[dq] DBX_CONTAINER_NAME=test\-alpine distrobox\-enter 66 | .EE 67 | .SH ENVIRONMENT VARIABLES 68 | .IP 69 | .EX 70 | DBX_CONTAINER_NAME 71 | DBX_CONTAINER_MANAGER 72 | DBX_SKIP_WORKDIR 73 | DBX_SUDO_PROGRAM 74 | .EE 75 | .SH EXTRA 76 | This command is used to enter the distrobox itself. 77 | Personally, I just create multiple profiles in my 78 | \f[CR]gnome\-terminal\f[R] to have multiple distros accessible. 79 | .PP 80 | The \f[CR]\-\-additional\-flags\f[R] or \f[CR]\-a\f[R] is useful to 81 | modify default command when executing in the container. 82 | For example: 83 | .IP 84 | .EX 85 | distrobox enter \-n dev\-arch \-\-additional\-flags \[dq]\-\-env my_var=test\[dq] \-\- printenv &| grep my_var 86 | my_var=test 87 | .EE 88 | .PP 89 | This is possible also using normal env variables: 90 | .IP 91 | .EX 92 | my_var=test distrobox enter \-n dev\-arch \-\-additional\-flags \-\- printenv &| grep my_var 93 | my_var=test 94 | .EE 95 | .PP 96 | If you\[cq]d like to enter a rootful container having distrobox use a 97 | program other than `sudo' to run podman/docker/lilipod as root, such as 98 | `pkexec' or `doas', you may specify it with the 99 | \f[CR]DBX_SUDO_PROGRAM\f[R] environment variable. 100 | For example, to use `doas' to enter a rootful container: 101 | .IP 102 | .EX 103 | DBX_SUDO_PROGRAM=\[dq]doas\[dq] distrobox enter \-n container \-\-root 104 | .EE 105 | .PP 106 | Additionally, in one of the config file paths that distrobox supports, 107 | such as \f[CR]\[ti]/.distroboxrc\f[R], you can also append the line 108 | \f[CR]distrobox_sudo_program=\[dq]doas\[dq]\f[R] (for example) to always 109 | run distrobox commands involving rootful containers using `doas'. 110 | -------------------------------------------------------------------------------- /man/man1/distrobox-ephemeral.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-EPHEMERAL" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox ephemeral 8 | distrobox\-ephemeral 9 | .EE 10 | .SH DESCRIPTION 11 | distrobox\-ephemeral creates a temporary distrobox that is automatically 12 | destroyed when the command is terminated. 13 | .SH SYNOPSIS 14 | \f[B]distrobox ephemeral\f[R] 15 | .IP 16 | .EX 17 | \-\-root/\-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 18 | way over \[dq]sudo distrobox\[dq] (note: if using a program other than \[aq]sudo\[aq] for root privileges is necessary, 19 | specify it through the DBX_SUDO_PROGRAM env variable, or \[aq]distrobox_sudo_program\[aq] config variable) 20 | \-\-verbose/\-v: show more verbosity 21 | \-\-help/\-h: show this message 22 | \-\-/\-e: end arguments execute the rest as command to execute at login default: default ${USER}\[aq]s shell 23 | \-\-version/\-V: show version 24 | .EE 25 | .SH EXAMPLES 26 | .IP 27 | .EX 28 | distrobox\-ephemeral \-\-image alpine:latest \-\- cat /etc/os\-release 29 | distrobox\-ephemeral \-\-root \-\-verbose \-\-image alpine:latest \-\-volume /opt:/opt 30 | .EE 31 | .PP 32 | You can also use flags from \f[B]distrobox\-create\f[R] to customize the 33 | ephemeral container to run. 34 | .SH SEE ALSO 35 | .IP 36 | .EX 37 | distrobox\-create \-\-help 38 | man distrobox\-create 39 | .EE 40 | .SH ENVIRONMENT VARIABLES 41 | .IP 42 | .EX 43 | distrobox\-ephemeral calls distrobox\-create, SEE ALSO distrobox\-create(1) for 44 | a list of supported environment variables to use. 45 | .EE 46 | -------------------------------------------------------------------------------- /man/man1/distrobox-export.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-EXPORT" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox\-export 8 | .EE 9 | .SH DESCRIPTION 10 | \f[B]Application and binary exporting\f[R] 11 | .PP 12 | distrobox\-export takes care of exporting an app or a binary from the 13 | container to the host. 14 | .PP 15 | The exported app will be easily available in your normal launcher and it 16 | will automatically be launched from the container it is exported from. 17 | .SH SYNOPSIS 18 | \f[B]distrobox\-export\f[R] 19 | .IP 20 | .EX 21 | \-\-app/\-a: name of the application to export or absolute path to desktopfile to export 22 | \-\-bin/\-b: absolute path of the binary to export 23 | \-\-list\-apps: list applications exported from this container 24 | \-\-list\-binaries list binaries exported from this container, use \-ep to specify custom paths to search 25 | \-\-delete/\-d: delete exported application or binary 26 | \-\-export\-label/\-el: label to add to exported application name. 27 | Use \[dq]none\[dq] to disable. 28 | Defaults to (on \[rs]$container_name) 29 | \-\-export\-path/\-ep: path where to export the binary 30 | \-\-extra\-flags/\-ef: extra flags to add to the command 31 | \-\-enter\-flags/\-nf: flags to add to distrobox\-enter 32 | \-\-sudo/\-S: specify if the exported item should be run as sudo 33 | \-\-help/\-h: show this message 34 | \-\-verbose/\-v: show more verbosity 35 | \-\-version/\-V: show version 36 | .EE 37 | .PP 38 | You may want to install graphical applications or CLI tools in your 39 | distrobox. 40 | Using \f[CR]distrobox\-export\f[R] from \f[B]inside\f[R] the container 41 | will let you use them from the host itself. 42 | .SH EXAMPLES 43 | .IP 44 | .EX 45 | distrobox\-export \-\-app mpv [\-\-extra\-flags \[dq]flags\[dq]] [\-\-delete] [\-\-sudo] 46 | distrobox\-export \-\-bin /path/to/bin [\-\-export\-path \[ti]/.local/bin] [\-\-extra\-flags \[dq]flags\[dq]] [\-\-delete] [\-\-sudo] 47 | .EE 48 | .PP 49 | \f[B]App export example\f[R] 50 | .IP 51 | .EX 52 | distrobox\-export \-\-app abiword 53 | .EE 54 | .PP 55 | This tool will simply copy the original \f[CR].desktop\f[R] files along 56 | with needed icons, add the prefix 57 | \f[CR]/usr/local/bin/distrobox\-enter \-n distrobox_name \-e ...\f[R] to 58 | the commands to run, and save them in your home to be used directly from 59 | the host as a normal app. 60 | .IP 61 | .EX 62 | distrobox\-export \-\-app /opt/application/my\-app.desktop 63 | .EE 64 | .PP 65 | This will skip searching for the desktopfile in canonical paths, and 66 | just use the provided file path. 67 | .PP 68 | \f[B]Binary export example\f[R] 69 | .IP 70 | .EX 71 | distrobox\-export \-\-bin /usr/bin/code \-\-extra\-flags \[dq]\-\-foreground\[dq] \-\-export\-path $HOME/.local/bin 72 | .EE 73 | .PP 74 | In the case of exporting binaries, you will have to specify 75 | \f[B]where\f[R] to export it (\f[CR]\-\-export\-path\f[R]) and the tool 76 | will create a little wrapper script that will 77 | \f[CR]distrobox\-enter \-e\f[R] from the host, the desired binary. 78 | This can be handy with the use of \f[CR]direnv\f[R] to have different 79 | versions of the same binary based on your \f[CR]env\f[R] or project. 80 | .PP 81 | The exported binaries will be exported in the 82 | \[lq]\[en]export\-path\[rq] of choice as a wrapper script that acts 83 | naturally both on the host and in the container. 84 | .PP 85 | \f[B]Additional flags\f[R] 86 | .PP 87 | You can specify additional flags to add to the command, for example if 88 | you want to export an electron app, you could add the 89 | \[lq]\[en]foreground\[rq] flag to the command: 90 | .IP 91 | .EX 92 | distrobox\-export \-\-app atom \-\-extra\-flags \[dq]\-\-foreground\[dq] 93 | distrobox\-export \-\-bin /usr/bin/vim \-\-export\-path \[ti]/.local/bin \-\-extra\-flags \[dq]\-p\[dq] 94 | .EE 95 | .PP 96 | This works for binaries and apps. 97 | Extra flags are only used then the exported app or binary is used from 98 | the host, using them inside the container will not include them. 99 | .PP 100 | \f[B]Unexport\f[R] 101 | .PP 102 | The option \[lq]\[en]delete\[rq] will un\-export an app or binary 103 | .IP 104 | .EX 105 | distrobox\-export \-\-app atom \-\-delete 106 | distrobox\-export \-\-bin /usr/bin/vim \-\-export\-path \[ti]/.local/bin \-\-delete 107 | .EE 108 | .PP 109 | \f[B]Run as root in the container\f[R] 110 | .PP 111 | The option \[lq]\[en]sudo\[rq] will launch the exported item as root 112 | inside the distrobox. 113 | .PP 114 | \f[B]Notes\f[R] 115 | .PP 116 | Note you can use \[en]app OR \[en]bin but not together. 117 | [IMAGE: \c 118 | .UR https://user-images.githubusercontent.com/598882/144294795-c7785620-bf68-4d1b-b251-1e1f0a32a08d.png 119 | app\-export 120 | .UE \c 121 | ] 122 | app\-export 123 | .PP 124 | NOTE: some electron apps such as vscode and atom need additional flags 125 | to work from inside the container, use the \f[CR]\-\-extra\-flags\f[R] 126 | option to provide a series of flags, for example: 127 | .PP 128 | \f[CR]distrobox\-export \-\-app atom \-\-extra\-flags \[dq]\-\-foreground\[dq]\f[R] 129 | -------------------------------------------------------------------------------- /man/man1/distrobox-generate-entry.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-GENERATE\-ENTRY" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox generate\-entry 8 | .EE 9 | .SH DESCRIPTION 10 | distrobox\-generate\-entry will create a desktop icon for one of the 11 | available distroboxes. 12 | This will be then deleted when you remove the matching distrobox. 13 | .SH SYNOPSIS 14 | \f[B]distrobox generate\-entry\f[R] 15 | .IP 16 | .EX 17 | \-\-help/\-h: show this message 18 | \-\-all/\-a: perform for all distroboxes 19 | \-\-delete/\-d: delete the entry 20 | \-\-icon/\-i: specify a custom icon [/path/to/icon] (default auto) 21 | \-\-root/\-r: perform on rootful distroboxes 22 | \-\-verbose/\-v: show more verbosity 23 | \-\-version/\-V: show version 24 | .EE 25 | .SH EXAMPLES 26 | Generate an entry for a container 27 | .IP 28 | .EX 29 | distrobox generate\-entry my\-container\-name 30 | .EE 31 | .PP 32 | Specify a custom icon for the entry 33 | .IP 34 | .EX 35 | distrobox generate\-entry my\-container\-name \-\-icon /path/to/icon.png 36 | .EE 37 | .PP 38 | Generate an entry for all distroboxes 39 | .IP 40 | .EX 41 | distrobox generate\-entry \-\-all 42 | .EE 43 | .PP 44 | Delete an entry 45 | .IP 46 | .EX 47 | distrobox generate\-entry container\-name \-\-delete 48 | .EE 49 | -------------------------------------------------------------------------------- /man/man1/distrobox-host-exec.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-HOST\-EXEC" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox\-host\-exec 8 | .EE 9 | .SH DESCRIPTION 10 | distrobox\-host\-exec lets one execute command on the host, while inside 11 | of a container. 12 | .PP 13 | Under the hood, distrobox\-host\-exec uses \f[CR]host\-spawn\f[R] a 14 | project that lets us execute commands back on the host. 15 | If the tool is not found the user will be prompted to install it. 16 | .SH SYNOPSIS 17 | Just pass to \[lq]distrobox\-host\-exec\[rq] any command and all its 18 | arguments, if any. 19 | .IP 20 | .EX 21 | \-\-help/\-h: show this message 22 | \-\-verbose/\-v: show more verbosity 23 | \-\-version/\-V: show version 24 | \-\-yes/\-Y: Automatically answer yes to prompt: 25 | host\-spawn will be installed on the guest system 26 | if host\-spawn is not detected. 27 | This behaviour is default when running in a non\-interactive shell. 28 | .EE 29 | .PP 30 | If no command is provided, it will execute \[lq]$SHELL\[rq]. 31 | .PP 32 | Alternatively, use symlinks to make \f[CR]distrobox\-host\-exec\f[R] 33 | execute as that command: 34 | .IP 35 | .EX 36 | \[ti]$: ln \-s /usr/bin/distrobox\-host\-exec /usr/local/bin/podman 37 | \[ti]$: ls \-l /usr/local/bin/podman 38 | lrwxrwxrwx. 1 root root 51 Jul 11 19:26 /usr/local/bin/podman \-> /usr/bin/distrobox\-host\-exec 39 | \[ti]$: podman version 40 | \&...this is executed on host... 41 | .EE 42 | .SH EXAMPLES 43 | .IP 44 | .EX 45 | distrobox\-host\-exec ls 46 | distrobox\-host\-exec bash \-l 47 | distrobox\-host\-exec flatpak run org.mozilla.firefox 48 | distrobox\-host\-exec podman ps \-a 49 | .EE 50 | -------------------------------------------------------------------------------- /man/man1/distrobox-init.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-INIT" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox\-init 8 | .EE 9 | .SH DESCRIPTION 10 | \f[B]Init the distrobox (not to be launched manually)\f[R] 11 | .PP 12 | distrobox\-init is the entrypoint of a created distrobox. 13 | Note that this HAS to run from inside a distrobox, will not work if you 14 | run it from your host. 15 | .PP 16 | \f[B]This is not intended to be used manually, but instead used by 17 | distrobox\-create to set up the container\[cq]s entrypoint.\f[R] 18 | .PP 19 | distrobox\-init will take care of installing missing dependencies (eg. 20 | sudo), set up the user and groups, mount directories from the host to 21 | ensure the tight integration. 22 | .SH SYNOPSIS 23 | \f[B]distrobox\-init\f[R] 24 | .IP 25 | .EX 26 | \-\-name/\-n: user name 27 | \-\-user/\-u: uid of the user 28 | \-\-group/\-g: gid of the user 29 | \-\-home/\-d: path/to/home of the user 30 | \-\-help/\-h: show this message 31 | \-\-additional\-packages: packages to install in addition 32 | \-\-init/\-I: whether to use or not init 33 | \-\-pre\-init\-hooks: commands to execute prior to init 34 | \-\-nvidia: try to integrate host\[aq]s nVidia drivers in the guest 35 | \-\-upgrade/\-U: run init in upgrade mode 36 | \-\-verbose/\-v: show more verbosity 37 | \-\-version/\-V: show version 38 | \-\-: end arguments execute the rest as command to execute during init 39 | .EE 40 | .SH EXAMPLES 41 | .IP 42 | .EX 43 | distrobox\-init \-\-name test\-user \-\-user 1000 \-\-group 1000 \-\-home /home/test\-user 44 | distrobox\-init \-\-upgrade 45 | .EE 46 | -------------------------------------------------------------------------------- /man/man1/distrobox-list.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-LIST" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox list 8 | distrobox\-list 9 | .EE 10 | .SH DESCRIPTION 11 | distrobox\-list lists available distroboxes. 12 | It detects them and lists them separately from the rest of normal 13 | containers. 14 | .SH SYNOPSIS 15 | \f[B]distrobox list\f[R] 16 | .IP 17 | .EX 18 | \-\-help/\-h: show this message 19 | \-\-no\-color: disable color formatting 20 | \-\-root/\-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 21 | way over \[dq]sudo distrobox\[dq] (note: if using a program other than \[aq]sudo\[aq] for root privileges is necessary, 22 | specify it through the DBX_SUDO_PROGRAM env variable, or \[aq]distrobox_sudo_program\[aq] config variable) 23 | \-\-verbose/\-v: show more verbosity 24 | \-\-version/\-V: show version 25 | .EE 26 | .SH EXAMPLES 27 | .IP 28 | .EX 29 | distrobox\-list 30 | .EE 31 | .PP 32 | You can also use environment variables to specify container manager 33 | .IP 34 | .EX 35 | DBX_CONTAINER_MANAGER=\[dq]docker\[dq] distrobox\-list 36 | .EE 37 | .SH ENVIRONMENT VARIABLES 38 | .IP 39 | .EX 40 | DBX_CONTAINER_MANAGER 41 | DBX_SUDO_PROGRAM 42 | .EE 43 | [IMAGE: \c 44 | .UR https://user-images.githubusercontent.com/598882/147831082-24b5bc2e-b47e-49ac-9b1a-a209478c9705.png 45 | image 46 | .UE \c 47 | ] 48 | image 49 | -------------------------------------------------------------------------------- /man/man1/distrobox-rm.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-RM" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox rm 8 | distrobox\-rm 9 | .EE 10 | .SH DESCRIPTION 11 | distrobox\-rm delete one of the available distroboxes. 12 | .SH SYNOPSIS 13 | \f[B]distrobox rm\f[R] 14 | .IP 15 | .EX 16 | \-\-all/\-a: delete all distroboxes 17 | \-\-force/\-f: force deletion 18 | \-\-rm\-home: remove the mounted home if it differs from the host user\[aq]s one 19 | \-\-root/\-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 20 | way over \[dq]sudo distrobox\[dq] (note: if using a program other than \[aq]sudo\[aq] for root privileges is necessary, 21 | specify it through the DBX_SUDO_PROGRAM env variable, or \[aq]distrobox_sudo_program\[aq] config variable) 22 | \-\-help/\-h: show this message 23 | \-\-verbose/\-v: show more verbosity 24 | \-\-version/\-V: show version 25 | .EE 26 | .SH EXAMPLES 27 | .IP 28 | .EX 29 | distrobox\-rm container\-name [\-\-force] [\-\-all] 30 | .EE 31 | .PP 32 | You can also use environment variables to specify container manager and 33 | name: 34 | .IP 35 | .EX 36 | DBX_CONTAINER_MANAGER=\[dq]docker\[dq] DBX_CONTAINER_NAME=test\-alpine distrobox\-rm 37 | .EE 38 | .SH ENVIRONMENT VARIABLES 39 | .IP 40 | .EX 41 | DBX_CONTAINER_MANAGER 42 | DBX_CONTAINER_NAME 43 | DBX_NON_INTERACTIVE 44 | DBX_SUDO_PROGRAM 45 | .EE 46 | -------------------------------------------------------------------------------- /man/man1/distrobox-stop.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-STOP" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox stop 8 | distrobox\-stop 9 | .EE 10 | .SH DESCRIPTION 11 | distrobox\-stop stop a running distrobox. 12 | .PP 13 | Distroboxes are left running, even after exiting out of them, so that 14 | subsequent enters are really quick. 15 | This is how they can be stopped. 16 | .SH SYNOPSIS 17 | \f[B]distrobox stop\f[R] 18 | .IP 19 | .EX 20 | \-\-all/\-a: stop all distroboxes 21 | \-\-yes/\-Y: non\-interactive, stop without asking 22 | \-\-help/\-h: show this message 23 | \-\-root/\-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 24 | way over \[dq]sudo distrobox\[dq] (note: if using a program other than \[aq]sudo\[aq] for root privileges is necessary, 25 | specify it through the DBX_SUDO_PROGRAM env variable, or \[aq]distrobox_sudo_program\[aq] config variable) 26 | \-\-verbose/\-v: show more verbosity 27 | \-\-version/\-V: show version 28 | .EE 29 | .SH EXAMPLES 30 | .IP 31 | .EX 32 | distrobox\-stop container\-name1 container\-name2 33 | distrobox\-stop container\-name 34 | distrobox\-stop \-\-all 35 | .EE 36 | .PP 37 | You can also use environment variables to specify container manager and 38 | name: 39 | .IP 40 | .EX 41 | DBX_CONTAINER_MANAGER=\[dq]docker\[dq] DBX_CONTAINER_NAME=test\-alpine distrobox\-stop 42 | .EE 43 | .SH ENVIRONMENT VARIABLES 44 | .IP 45 | .EX 46 | DBX_CONTAINER_MANAGER 47 | DBX_CONTAINER_NAME 48 | DBX_NON_INTERACTIVE 49 | DBX_SUDO_PROGRAM 50 | .EE 51 | -------------------------------------------------------------------------------- /man/man1/distrobox-upgrade.1: -------------------------------------------------------------------------------- 1 | .\ 2 | .\" 3 | .TH "DISTROBOX\-UPGRADE" "1" "Apr 2025" "Distrobox" "User Manual" 4 | .SH NAME 5 | .IP 6 | .EX 7 | distrobox\-upgrade 8 | .EE 9 | .SH DESCRIPTION 10 | distrobox\-upgrade will enter the specified list of containers and will 11 | perform an upgrade using the container\[cq]s package manager. 12 | .SH SYNOPSIS 13 | \f[B]distrobox upgrade\f[R] 14 | .IP 15 | .EX 16 | \-\-help/\-h: show this message 17 | \-\-all/\-a: perform for all distroboxes 18 | \-\-running: perform only for running distroboxes 19 | \-\-root/\-r: launch podman/docker/lilipod with root privileges. Note that if you need root this is the preferred 20 | way over \[dq]sudo distrobox\[dq] (note: if using a program other than \[aq]sudo\[aq] for root privileges is necessary, 21 | specify it through the DBX_SUDO_PROGRAM env variable, or \[aq]distrobox_sudo_program\[aq] config variable) 22 | \-\-verbose/\-v: show more verbosity 23 | \-\-version/\-V: show version 24 | .EE 25 | .SH EXAMPLES 26 | Upgrade all distroboxes 27 | .IP 28 | .EX 29 | distrobox\-upgrade \-\-all 30 | .EE 31 | .PP 32 | Upgrade all running distroboxes 33 | .IP 34 | .EX 35 | distrobox\-upgrade \-\-all \-\-running 36 | .EE 37 | .PP 38 | Upgrade a specific distrobox 39 | .IP 40 | .EX 41 | distrobox\-upgrade alpine\-linux 42 | .EE 43 | .PP 44 | Upgrade a list of distroboxes 45 | .IP 46 | .EX 47 | distrobox\-upgrade alpine\-linux ubuntu22 my\-distrobox123 48 | .EE 49 | .PP 50 | \f[B]Automatically update all distro\f[R] 51 | .PP 52 | You can create a systemd service to perform distrobox\-upgrade 53 | automatically, this example shows how to run it daily: 54 | .PP 55 | \[ti]/.config/systemd/user/distrobox\-upgrade.service 56 | .IP 57 | .EX 58 | [Unit] 59 | Description=distrobox\-upgrade Automatic Update 60 | 61 | [Service] 62 | Type=simple 63 | ExecStart=distrobox\-upgrade \-\-all 64 | StandardOutput=null 65 | .EE 66 | .PP 67 | \[ti]/.config/systemd/user/distrobox\-upgrade.timer 68 | .IP 69 | .EX 70 | [Unit] 71 | Description=distrobox\-upgrade Automatic Update Trigger 72 | 73 | [Timer] 74 | OnBootSec=1h 75 | OnUnitInactiveSec=1d 76 | 77 | [Install] 78 | WantedBy=timers.target 79 | .EE 80 | .PP 81 | Then simply do a 82 | \f[CR]systemctl \-\-user daemon\-reload && systemctl \-\-user enable \-\-now distrobox\-upgrade.timer\f[R] 83 | -------------------------------------------------------------------------------- /uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SPDX-License-Identifier: GPL-3.0-only 3 | # 4 | # This file is part of the distrobox project: https://github.com/89luca89/distrobox 5 | # 6 | # Copyright (C) 2021 distrobox contributors 7 | # 8 | # distrobox is free software; you can redistribute it and/or modify it 9 | # under the terms of the GNU General Public License version 3 10 | # as published by the Free Software Foundation. 11 | # 12 | # distrobox is distributed in the hope that it will be useful, but 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | # General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with distrobox; if not, see . 19 | 20 | # POSIX 21 | 22 | verbose=0 23 | 24 | # Print usage to stdout. 25 | # Arguments: 26 | # None 27 | # Outputs: 28 | # print usage with examples. 29 | show_help() 30 | { 31 | cat << EOF 32 | uninstall --prefix /usr/local 33 | 34 | Options: 35 | --prefix/-P: base bath where all files will be deployed (default /usr/local if root, ~/.local if not) 36 | --help/-h: show this message 37 | -v: show more verbosity 38 | EOF 39 | } 40 | 41 | # Parse arguments 42 | while :; do 43 | case $1 in 44 | -h | --help) 45 | # Call a "show_help" function to display a synopsis, then exit. 46 | show_help 47 | exit 48 | ;; 49 | -v | --verbose) 50 | shift 51 | verbose=1 52 | ;; 53 | -p | --path) 54 | if [ -n "$2" ]; then 55 | dest_path="$2" 56 | shift 57 | shift 58 | fi 59 | ;; 60 | -P | --prefix) 61 | if [ -n "$2" ]; then 62 | prefix="$2" 63 | shift 64 | shift 65 | fi 66 | ;; 67 | *) # Default case: If no more options then break out of the loop. 68 | break ;; 69 | esac 70 | done 71 | 72 | if [ -z "${prefix}" ]; then 73 | prefix="/usr/local" 74 | # in case we're not root, just default to the home directory 75 | if [ "$(id -u)" -ne 0 ]; then 76 | prefix="${HOME}/.local" 77 | fi 78 | fi 79 | dest_path="${prefix}/bin" 80 | man_dest_path="${prefix}/share/man/man1" 81 | icon_dest_path="${prefix}/share/icons" 82 | completion_dest_path="${prefix}/share/bash-completion/completions/" 83 | 84 | set -o errexit 85 | set -o nounset 86 | # set verbosity 87 | if [ "${verbose}" -ne 0 ]; then 88 | set -o xtrace 89 | fi 90 | 91 | [ ! -w "${dest_path}" ] && printf >&2 "Cannot write into %s, permission denied.\n" "${dest_path}" && exit 1 92 | [ ! -w "${man_dest_path}" ] && printf >&2 "Cannot write into %s, permission denied.\n" "${man_dest_path}" && exit 1 93 | 94 | # uninstall 95 | for file in "${dest_path}/distrobox"*; do 96 | [ -e "${file}" ] && rm "${file}" 97 | done 98 | for file in "${man_dest_path}/distrobox"*; do 99 | [ -e "${file}" ] && rm "${file}" 100 | done 101 | for file in "${completion_dest_path}/distrobox"*; do 102 | [ -e "${file}" ] && rm "${file}" 103 | done 104 | [ -e "${icon_dest_path}"/terminal-distrobox-icon.svg ] && rm "${icon_dest_path}"/terminal-distrobox-icon.svg 105 | [ -e "${icon_dest_path}"/distrobox ] && rm -rf "${icon_dest_path}"/distrobox 106 | 107 | printf >&2 "\033[1;32m Thank you for using Distrobox. Uninstall complete.\n\033[0m" 108 | printf >&2 "\033[0m Removed shell scripts located in \033[1;31m%s\n\033[0m" "${dest_path}" 109 | printf >&2 "\033[0m Removed manpages located in \033[1;31m%s\n\033[0m" "${man_dest_path}" 110 | --------------------------------------------------------------------------------