{"id":19952070,"url":"https://github.com/econcz/debchroot","last_synced_at":"2025-03-01T15:15:30.884Z","repository":{"id":254026726,"uuid":"845260533","full_name":"econcz/debchroot","owner":"econcz","description":"Run your Linux and Wine-based i386 (x86)/amd64 (x86_64) apps on armhf/arm64 (aarch64) devices!","archived":false,"fork":false,"pushed_at":"2024-08-23T18:49:35.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T06:25:10.190Z","etag":null,"topics":["arm64","armhf","chroot","chroot-script","i386","x11","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/econcz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-20T22:52:12.000Z","updated_at":"2025-01-04T02:06:30.000Z","dependencies_parsed_at":"2025-01-12T06:23:13.473Z","dependency_job_id":"85b0652d-2ec8-4d86-b543-884246e4f5f3","html_url":"https://github.com/econcz/debchroot","commit_stats":null,"previous_names":["econcz/debchroot"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/econcz%2Fdebchroot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/econcz%2Fdebchroot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/econcz%2Fdebchroot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/econcz%2Fdebchroot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/econcz","download_url":"https://codeload.github.com/econcz/debchroot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241381646,"owners_count":19953751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm64","armhf","chroot","chroot-script","i386","x11","x86-64"],"created_at":"2024-11-13T01:11:24.936Z","updated_at":"2025-03-01T15:15:30.861Z","avatar_url":"https://github.com/econcz.png","language":"Shell","readme":"# debchroot\nWith this **highly configurable bash script** you can enable your 32-bit/64-bit Raspberry Pi, Orange Pi, Arduino UNO, ASUS Tinker Board S R2.0, etc., as well as Android/Harmony OS-based devices (root access required) with ARM architecture support 32-bit/64-bit x86_64 applications, such as every version of **AMPL**, **GAMS**, **Stata**, **TeXmacs**, or **Wine/CrossOver** software, with **a single command**. The script creates a minimal Debian/Ubuntu-based chroot in /var/chroot_\\\u003carch\\\u003e mirroring your user's home folder and bind-mounting all directories matching '\\~/\\*', together with the '~/.config/\\*' (this allows to run the same app, e.g., Calibre, on different architectures with shared configuration and can be turned off if needed). Technically, you can create multiple chroots, each with a different architecture (so far, one for each architecture), an open filesystem (in contrast to **docker**), and a shared X11 server, including a /var/chroot_arm64 on an x86_64 machine (or /var/chroot_armhf on an x86 one). The apps in chroot are then run with the help of **QEMU** (AMPL, GAMS, Stata, TeXmacs, etc.) and **box86/box64** (Wine/CrossOver, box86 and box64 need to be compiled by you following an easy manual) binary format configurations. The **crossover** command allows both binfmt configurations to co-exist, i.e., you can launch your Stata (TeXmacs) and EndNote (or a Steam game) on your device simultaneously with one short command/single click!\n\nThis repository provides several pre-configured versions of the script for these five cases: a) AMPL, b) GAMS, a) Stata (which is, by default, configured with *evince* as the Stata manual viewer in chroot, please install it in host as well), b) TeXmacs, and c) Wine/Crossover. The AMPL, GAMS, and Stata-specific versions of the script search for files matching '\\*ampl\\*gz', '\\*gams\\*exe', '\\*stata\\*gz\\*', and '\\*crossover\\*.deb' (string case irrelevant) in the user's home directory. If you are interested in using the script, put the script file into **/usr/local/bin/** or **~/.local/bin**, an appropriately-named installer (if required) into **~**, and run these commands in your terminal:\n\n```bash\nchmod 0755 \"$(which debchroot)\"\nsudo debchroot —-help\nsudo debchroot —-install\nsudo debchroot -—setup\n```\n\nAfter this, simply run **ampl**, **gams**, **stata**, **xstata**, **stata-se**, etc., **texmacs**, or **crossover** (CrossOver has to be run \"outside the chroot\", therefore please use the provided *crossover* script). Please note that GAMS Studio and AMPL IDE do not work under chroot, neither does, e.g., [SDMX.jar](https://github.com/amattioc/SDMX) in Stata (I found a workaround though).\n\nTo avoid typing **sudo debchroot --setup** every session, you can add this line to your user's or root's crontab, replacing \\\u003carchitecture\\\u003e, \\\u003cuser\\\u003e, and \\\u003cpath\\\u003e with the required values, e.g., **amd64**, **$(whoami)** (or your username if run under root) and **/usr/local/bin/**:\n\n```bash\n@reboot sleep 60; sudo ARCH=\u003carchitecture\u003e CHROOT_USER=\u003cuser\u003e \u003cpath\u003e/debchroot --setup\n```\n\nFor advanced uses, such as to start a shell (bash) session and to run a command, simply type **sudo debchroot** and **sudo debchroot \"cmd\"**, for example:\n\n```bash\nsudo debchroot\nsudo debchroot \"echo hello world\"\nsudo debchroot \"host 'echo this runs a command under host'\"\n```\n\n**NB** The instructions on how to avoid password on running the **host** command under chroot are provided in **sudo chroot --help**.\n\n**PS** A single line in crontab, changing the priority (*niceness*) of selected processes, can significantly increase the speed of QEMU-run chroots, please follow the instructions in **sudo chroot --help** to set it up. However, TeXmacs performs the worst in all cases.\n\n**PS** The **debchroot** script is divided into sections, please add all your custom code into the ones labeled `# \u003c!-- concrete apps -…-\u003e` and `# \u003c!-- /concrete apps -…-\u003e`.\n\n**Requirements:**\n- zsh\n- p7zip-full\n- debootstrap\n- qemu-user-static\n- box86 (optional) [compile instructions](https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md)\n- box64 (optional) [compile instructions](https://github.com/ptitSeb/box64/blob/main/docs/COMPILE.md)\n\n```bash\nsudo apt-get install zsh p7zip-full qemu-user-static\n```\n\nThe script is primarily designed to be run on Debian/Ubuntu systems, but you can also run **debootstrap** via docker (or by any other means).\n\n**help for debchroot:**\n\n```bash\ntype /usr/local/bin/debchroot --info    to display the chroot parameters\ntype /usr/local/bin/debchroot --install to install the chroot environment\ntype /usr/local/bin/debchroot --setup   to set up the chroot environment\ntype /usr/local/bin/debchroot --setup+  same + add symlinks in /usr/lib/\ntype /usr/local/bin/debchroot --umount  to unmount the chroot environment\ntype /usr/local/bin/debchroot --umount+ same + remove the added symlinks\ntype /usr/local/bin/debchroot --backup  to backup unsynced folders/files\ntype /usr/local/bin/debchroot --restore to restore the chroot environment\ntype /usr/local/bin/debchroot \u003ccmd\u003e     to run \u003ccmd\u003e under chroot\n\nNB type DISPLAY=:1 CHROOT_USER=root ARCH=i386 SUITE=jessie APTSOURCE=http://archive.debian.org/debian/ /usr/local/bin/debchroot \u003cflag|cmd\u003e to change default parameters\n\nNB type host \u003cnohup\u003e \u003ccmd\u003e under [chroot] to run a command in [host]\n   to avoid password, please add these lines to /etc/ssh/sshd_config\n\nAuthorizedKeysCommand /bin/sh -c \"cat %h/.ssh/authorized_keys.d/*\"\nAuthorizedKeysCommandUser root\n\nPS to speed up chroot, you may want to add this line to your crontab\n\n* * * * *  renice -n -20 $(ps aux | grep qemu-binfmt | grep -v grep | awk ‘{print $2}’) \u0026\u003e /dev/null\n```\n\n**If something doesn't work, please post the error into issues**.\n\n**Buy me a coffee via a donation if you like the script!**  \n[paypal.me](https://www.paypal.com/paypalme/IBOLOTOV?country.x=CZ\u0026locale.x=cs_CZ)\n","funding_links":["https://www.paypal.com/paypalme/IBOLOTOV?country.x=CZ\u0026locale.x=cs_CZ"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feconcz%2Fdebchroot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feconcz%2Fdebchroot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feconcz%2Fdebchroot/lists"}