Jump to content

Computing Layers 260206

From Game in the Brain Wiki

Modern Computing Workflows: A Student Guide

1. Core Concepts: The "Layers" of Computing

To understand modern workflows, we must first distinguish between the three ways we run foreign software on a computer.

Emulation

Emulation involves software that mimics hardware. The emulator pretends to be a specific CPU or device (like a Game Boy or an old mainframe), allowing software written for that hardware to run on a completely different machine. It is highly compatible but generally slow due to the overhead of simulating every hardware instruction.

  • Source: https://en.wikipedia.org/wiki/Emulator

Virtualization

Virtualization splits a single physical computer into multiple "virtual" machines (VMs). Unlike emulation, it does not simulate the CPU; it allows the guest OS to run instructions directly on the host CPU via a Hypervisor. This results in near-native speed but requires the guest and host to share the same CPU architecture (e.g., x86 on x86).

  • Source: https://en.wikipedia.org/wiki/Virtualization

Translation (Compatibility Layers)

Translation (or Binary Translation) maps API calls from one system to another in real-time. It does not simulate hardware (like emulation) nor run a full OS (like virtualization). It simply translates the "language" of the app to the "language" of the host OS (e.g., mapping Windows DirectX calls to Linux Vulkan).

  • Source: https://en.wikipedia.org/wiki/Compatibility_layer

2. The Windows Compatibility Ecosystem

The ability to run Windows applications on Linux without a copy of Windows is powered by a massive open-source ecosystem.

Wine (Wine Is Not an Emulator)

Wine is the foundational compatibility layer. It translates Windows API calls (Win32) into POSIX calls on the fly. It does not simulate a computer; it re-implements Windows libraries so Linux can understand them.

  • Source: https://www.google.com/search?q=https://en.wikipedia.org/wiki/Wine_(software)

CodeWeavers & CrossOver

CodeWeavers is a company that employs many main Wine developers. They sell CrossOver, a polished, commercial version of Wine with official support. Their work is upstreamed back to Wine, benefiting everyone.

  • Source: https://www.google.com/search?q=https://en.wikipedia.org/wiki/CrossOver_(software)

Valve's Proton

Proton is a tool released by Valve (integrated into Steam) to run Windows games on Linux. It bundles Wine with DXVK (a library that translates DirectX 9/10/11 to Vulkan) and VKD3D (DirectX 12 to Vulkan). This translation to Vulkan is what allows Windows games to run at near-native speeds on the Steam Deck.

  • Source: https://www.google.com/search?q=https://en.wikipedia.org/wiki/Proton_(software)

Bottles

Bottles is a modern GUI manager for Wine. It introduces the concept of "Environments" (Gaming, Software, Custom). It sandboxes Wine prefixes (keeping them separate so one broken app doesn't affect others) and provides easy toggles for complex dependencies (like DXVK, vkd3d, LatencyFleX).

  • Source: https://usebottles.com/

3. OS-Level Containerization & "Seamless" Windows

Sometimes Translation (Wine) isn't enough (e.g., for Adobe apps or Anti-Cheat games). In these cases, we use Virtualization, but we hide the Virtual Machine so the apps look native.

WinBoat (and WinApps)

WinBoat (a modern evolution similar to WinApps) allows users to run real Windows applications on Linux by spinning up a lightweight Windows VM (using KVM/Docker) in the background.

  • How it works: It uses RDP (Remote Desktop Protocol) to "project" the individual application window onto the Linux desktop.
  • The Result: You see Excel or Photoshop running as if it were a native Linux app, but it is actually running inside a hidden, containerized Windows kernel.
  • Source: https://github.com/TibixDev/winboat

Distrobox vs. Standard Docker

While both use container technology, they serve different purposes:

  • Docker (Immutable): Designed for servers. Is isolated from the host. If you install a library, it disappears when you restart the container (unless you build a new image).
  • Distrobox (Mutable): Designed for desktop users. It integrates with the host (shares Home folder, USB, Audio). It is "mutable," meaning if you install a package, it stays there. It effectively allows you to have Arch Linux, Ubuntu, and Fedora terminals running simultaneously on one machine.
  • Source: https://github.com/89luca89/distrobox

4. Android Integration: Emulation vs. Translation

Running mobile apps on a desktop follows the same Emulation vs. Translation divide.

BlueStacks (Emulation)

BlueStacks is a traditional Android Emulator. It simulates the entire Android hardware environment. It is heavy, resource-intensive, and often filled with ads, but it is easy to install on Windows.

  • Source: https://en.wikipedia.org/wiki/BlueStacks

Waydroid (Containerization)

Waydroid is the Linux-native approach. Because Android uses the Linux Kernel, Waydroid does not need to emulate hardware. It runs Android in a container (LXC) directly on the host kernel.

  • The Benefit: Near-native performance with zero emulation overhead.
  • The Constraint: Requires a Wayland compositor (hence the name).
  • Source: https://waydro.id/

5. Visualizing Headless Containers (NoVNC)

In server environments or "Headless" setups (where there is no monitor), we still sometimes need a Graphical User Interface (GUI).

NoVNC & Kasm

NoVNC is a technology that allows a VNC (screen sharing) session to be rendered inside a standard HTML5 web browser.

  • Workflow: You run a Docker container (e.g., a secure browser or a full Linux Desktop like Kasm).
  • Access: You open Chrome/Firefox and navigate to localhost:3000. The "Monitor" is now a tab in your browser.
  • Utility: This allows students to access full GUI applications hosted on remote servers or restricted environments without installing any client software.
  • Source: https://www.google.com/search?q=https://en.wikipedia.org/wiki/NoVNC

6. Modularization and Appification

The "It only works on my computer" problem arises when software relies on specific system libraries, paths, or configurations present on the developer's machine but missing elsewhere.

Appification solves this by bundling the application with all its dependencies (libraries, configs, and even the OS filesystem) into a single, portable unit called a Container.

Device Independence & Linux Phones

Modularity provides the ability to move apps seamlessly between devices. Because Linux containers carry their own environment, the same container running on a desktop can often run on a Linux Phone (like a PinePhone or Librem 5). This decouples your digital life from specific hardware vendors, ensuring that your tools persist even if you change physical devices.

Example: OpenFOAM Docker

OpenFOAM is complex Computational Fluid Dynamics (CFD) software known for being difficult to install due to strict dependency requirements.

  • Old Workflow: Spend hours compiling source code and fixing library errors.
  • Appified Workflow: The user downloads a pre-sealed container. The container is the app. If it runs on the teacher's computer, it is mathematically guaranteed to run on the student's computer.

Naked Link: https://www.google.com/search?q=https://hub.docker.com/r/openfoam/openfoam-default

7. Digital Sovereignty: Sandboxing & Attention Control

Compartmentalization is not just for software stability; it is a tool for mental defense. Modern "Enhanced Influence" algorithms and aggressive marketing rely on tracking user behavior across a unified system.

  • The Strategy: By using Sandboxing, users can isolate different aspects of their lives (e.g., a "Social Media Box," a "Banking Box," a "Work Box").
  • The Benefit: Tracking cookies and behavioral data do not bleed from one box to another. This mitigates the ability of algorithms to build a complete profile of you, giving you more control over your attention and reducing targeted manipulation.

Example: High-Security Banking via Remote Control

Banking applications often demand invasive access to the device's OS (checking for "root," requiring deep system integration) and are hostile to privacy-focused Linux environments.

  • The Strategy: Keep a dedicated "Secure Phone" with banking apps physically stored in a safe location at home.
  • The Workflow: Use your daily driver (Linux Phone) to access the Secure Phone via an encrypted VPN connection. You view the screen and control the app remotely.
  • The Defense: If you travel to a surveillance state or your device is seized, your financial data remains physically secure at home. You are not emulating the banking app (which often fails due to security checks); you are remotely puppeteering the real device.

8. The "Burner" Workflow

This workflow treats computing environments as disposable ("cattle, not pets"). Instead of maintaining a single, messy operating system with conflicting tools, the user spins up a temporary environment for a specific task and deletes it when finished.

Tool: Distrobox

Distrobox uses Docker or Podman to create mutable Linux containers that integrate deeply with the host.

  • Workflow:
    1. Create a "burner" box for a project: distrobox create -n test-env
    2. Enter the box and install experimental libraries.
    3. If the environment breaks, simply delete the box (distrobox rm test-env) and create a fresh one.
    4. The main host OS remains clean and stable.

Naked Link: https://github.com/89luca89/distrobox

Tool: BoxBuddy (Buddybox)

BoxBuddy is a Graphical User Interface (GUI) for Distrobox. It acts as a visual manager for your "burner" environments, allowing you to manage them without using the terminal.

  • Workflow:
    1. Visualize all active containers in a dashboard.
    2. Create or Delete containers with a single click.
    3. "Unbox" applications (export them to the host menu) visually.

Naked Link: https://www.google.com/search?q=https://github.com/89luca89/boxbuddy

9. Puppeteering & Agentic Workflows

We are transitioning to an era where "Anything can control anything." This concept works in two directions:

  1. Attack: Malicious actors can hijack your system.
  2. Defense/Utility: You can sandbox, isolate, and "puppet" your own system or external systems.

Agentic Tools

Tools like Claude Code, OpenCode, Gemini Code Assistant, and CLI Agents allow users to control their operating system using natural language.

  • Moltbot (formerly Clawdbot): An autonomous local agent that acts as a "digital intern" with shell access to execute tasks.
  • Puppeteering: Using scripts to automate browser interactions or system tasks, effectively simulating a human user to bypass repetitive workflows.

Naked Link: https://github.com/moltbot/moltbot

10. Student Takeaways: The Linux Paradigm

Students must understand that learning Linux is not just about learning an operating system; it is about learning a philosophy of control.

  • Universal Platform: Linux is the platform that runs the world (servers, supercomputers, phones). Learning it means learning the foundation of modern computing.
  • Universal Compatibility: With containers and compatibility layers, they can make anything run on Linux.
  • Control vs. Being Controlled: The system is open. If they do not control it, someone else (advertisers, attackers) will.
  • Layers of Defense: Security is not a product you buy; it is a process. Students must learn to script their own defenses:
    • Automating the creation of Burner Accounts and Burner Environments.
    • Obfuscating their identity through compartmentalization.
  • Puppeteering: The ultimate skill is the ability to automate the controller itself—writing scripts and agents that drive the machine, rather than just being a passive user of the interface.