{"id":13500207,"url":"https://github.com/joshiemoore/snakeware","last_synced_at":"2025-05-15T15:05:54.459Z","repository":{"id":41319106,"uuid":"267446578","full_name":"joshiemoore/snakeware","owner":"joshiemoore","description":"A free Linux distro with a Python-based userspace","archived":false,"fork":false,"pushed_at":"2023-12-30T20:29:16.000Z","size":89059,"stargazers_count":1723,"open_issues_count":30,"forks_count":100,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-08T11:07:01.975Z","etag":null,"topics":["linux","operating-system","python","rpi4","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Python","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/joshiemoore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-05-27T23:24:13.000Z","updated_at":"2025-04-02T18:54:17.000Z","dependencies_parsed_at":"2024-09-30T21:20:39.382Z","dependency_job_id":"5b070305-8a6f-4f5a-a6a2-f8907a34dfbe","html_url":"https://github.com/joshiemoore/snakeware","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshiemoore%2Fsnakeware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshiemoore%2Fsnakeware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshiemoore%2Fsnakeware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshiemoore%2Fsnakeware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshiemoore","download_url":"https://codeload.github.com/joshiemoore/snakeware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"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":["linux","operating-system","python","rpi4","x86-64"],"created_at":"2024-07-31T22:00:53.356Z","updated_at":"2025-05-15T15:05:54.439Z","avatar_url":"https://github.com/joshiemoore.png","language":"Python","readme":"# snakeware\nsnakeware is a free Linux distro with a Python userspace inspired by the Commodore 64. You are booted directly into a\nPython interpreter, which you can use to do whatever you want with your computer.\n\n[Check out our latest demo on YouTube!](https://www.youtube.com/watch?v=PYKUnC-k5bA)\n\n![snakeware/snakewm running in QEMU](screenshot.png)\n\n## Motivation\nThe idea is that a Python OS would be fun to use and very easy to contribute to. Even relative beginners might be able\nto find ways to meaningfully contribute apps and other code to this distro.\n\nOur window manager, snakewm, is based on pygame/pygame_gui. We do not use X11; snakewm draws directly to `/dev/fb0`.\n\nWe also are not going to be using any other huge and opaque software such as systemd, etc. The goal is to eventually\nhave a usable set of userspace apps and utilities written entirely in Python, because Python is fun and it Just Werks™.\n\n## Running\n[Download the latest release image.](https://github.com/joshiemoore/snakeware/releases)\n\nYou can burn the x86-64 ISO file to a flash drive and boot it, or launch the ISO in VirtualBox. Instructions to run it \nin QEMU are below.\n\nThe rpi4 image can be flashed to an SD card and run on your Raspberry Pi 4, with no further setup required.\n\n### Flash Drive / SD Card\n\nTo run snakeware on real hardware, simply write the image file to the flash drive or SD card using `dd`, then boot it.\nNo further setup is required if you just need a live, non-persistent environment.\n\n### Creating a Persistent Partition\n[Video Tutorial Here](https://www.youtube.com/watch?v=qBbr9N1TIqQ)\n\n1. Note the virtual device corresponding to the drive you wrote the snakeware image to. For this example, we will\nassume `/dev/sdc`.\n2. Use `cfdisk` to add another partition to the drive, after the snakeware partition. This partition can be any size, but you'll likely want to fill the rest of the drive. Take note of the number of the new partition. This will be your \"snakeuser\" partition, where all of your scripts and data will be stored.\n3. Once you have written the partition to the drive, format the partition to ext4. For example, `mkfs.ext4 /dev/sdc2`.\n4. Finally, give the paritition the SNAKEUSER label, ex: `e2label /dev/sdc2 SNAKEUSER`.\n\nOnce you've completed these steps, the snakeuser partition will be automatically mounted as `/snakeuser` and chdir'd\ninto on boot. Files and data stored on this partition will persist between boots.\n\n### QEMU\n\nTo run snakeware on QEMU:\n\n1. [Download and install QEMU](https://www.qemu.org/download/).\n2. Open your terminal/command prompt.\n3. Navigate to the directory/folder where the snakeware image image was downloaded.\n4. Launch the snakeware ISO using a script similar to this:\n```\nRAM=\"2G\"\nISO=\"snakeware_x86-64.iso\"\n\nAUDIO=\"pa\" # also available: alsa\n\nexec qemu-system-x86_64 \\\n        -drive file=\"$ISO\",media=cdrom,if=virtio \\\n        -m \"$RAM\" \\\n        -cpu host \\\n        -machine type=q35,accel=kvm \\\n        -smp $(nproc) \\\n        -audiodev \"$AUDIO,id=snd\" \\\n        -device ich9-intel-hda \\\n        -device hda-output,audiodev=snd\n```\n5. Wait for it to load.\n6. You will be be taken to a Python environment/shell.\n\n### VirtualBox\n\nTo run snakeware on VirtualBox:\n\n1. [Download and install VirtualBox](https://www.virtualbox.org/wiki/Downloads).\n2. Open and create a new virtual machine with `Type: Linux` and `Version: Other Linux (64-bit)`.\n3. Set virtual hard disk size and RAM (recommended 2GB) to your liking.\n4. After snakeware VM is created, open vm settings, go to `Storage`.\n5. Click small disk icon next to `Controller: IDE`, then `Add`.\n6. Add `snakeware.iso` and click `Choose`\n7. Go to `Display` and set `Graphics Controller: ` to `VBoxVGA`\n8. Click `Okay` and then `Start` to run VM.\n9. You will be loaded into a Python environment/shell.\n\n### Launching snakewm\n\nTo load snakewm from Python shell:\n\n1. Launch snakewm with either of the following Python commands:\n```\n\u003e\u003e\u003e snakewm\n```\nor\n```\n\u003e\u003e\u003e from snakewm.wm import SnakeWM\n\u003e\u003e\u003e SnakeWM().run()\n```\n2. To open the app menu press the Super key.\n\n## Building\nGNU/Linux is the only supported development platform for snakeware. If you encounter build errors while trying\nto build on Windows or macOS, please ensure the error is reproducible in a GNU/Linux environment before opening\nan issue.\n\nThe snakeware build system is based on buildroot. See the `snakeware/` directory in this repo for resources and\ndocumentation on how to build your own snakeware distro image.\n\n**NOTE:** If you are only contributing apps or other code to snakewm, you don't need to build a whole snakeware distro \nimage to test your changes. Simply make your changes to snakewm then run `sudo python wm.py` in the `snakewm/` \ndirectory. snakewm will then start drawing itself directly to the framebuffer and you can test out your changes. \nPress `ALT+ESC` to return to your normal desktop. (It would still be good to test your changes in an actual\nsnakeware environment though.)\n\n## Contributing\nDevelopers of all experience levels are welcome and encouraged to contribute to snakeware. Python enthusiasts that are\nfamiliar with pygame and pygame_gui will be able to write their own snakeware apps very easily. See existing apps\nin `snakewm/apps/` for examples of how to get started, and feel free to ask questions if you need help.\n\nThose with experience building Linux systems are encouraged to contribute to the underlying aspects of the distro,\nsuch as the build/package scripts and configuration for the kernel, GRUB, etc.\n\nI would also like to eventually stop using Busybox for intialization and find a way to perform all necessary init from\nthe Python environment, so ideas about that are welcome.\n\n## TODO\nThis is an abridged list of future plans:\n\n* ~~Raspberry Pi configs for buildroot and kernel!!!!!!!~~\n* ~~Fix pip module installation - won't work when cross-compiling~~\n* Many more snakewm apps\n* ~~App menu for choosing apps to run~~\n* ~~Improved/streamlined build system~~\n* Improved kernel config\n* snake-games - full-screen user games separate from SnakeWM\n* ~~Modify partition scheme for faster boot - /usr on its own partition?~~\n* Take advantage of pygame_gui's theme functionality\n* ~~Dynamic/interactive desktop backgrounds~~\n* ~~Sound support~~\n* Networking -\u003e web browser\n    + snakechat - chat with everyone else who's using snakeware\n    + Gopher client?\n* Ditch busybox, init via Python somehow\n* ...\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshiemoore%2Fsnakeware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshiemoore%2Fsnakeware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshiemoore%2Fsnakeware/lists"}