Documentation
Architecture
FakeOS is split into two components:
- Backend (Node.js): Runs on your server. It uses
node-ptyto spawn pseudo-terminals andfsto manage the file system. It communicates with the frontend via WebSockets (Socket.io). - Frontend (HTML/JS): Runs in your browser. It renders the desktop environment using standard DOM elements. It uses
xterm.jsfor the terminal andMonaco Editorfor code editing.
Key Components
File Explorer
The File Explorer allows you to navigate the server's file system. It supports drag-and-drop, context menus, and file operations like copy, move, and zip.
Terminal
The terminal provides full shell access. It supports colors, resizing, and session persistence (you can reload the page and your commands keep running).
Apps
- FakeMedia: View images and videos.
- FakeBrowser: Browse the web (via iframe) or view HTML/PDF files.
- Settings: Customize the look and feel.
Troubleshooting
Terminal not working?
Ensure you have build-essential and python3 installed on Linux, as node-pty requires compilation.
Zip/Unzip fails?
FakeOS relies on the system's tar command. Ensure tar is installed and in your system PATH.