📌 Purpose & Quick Summary
The Web Terminal brings full shell power directly into your browser window. Engineered with xterm.js and isolated via JailShell chroot sandboxing, it gives you secure, low-latency command-line access to execute Git operations, Composer dependencies, NPM builds, WP-CLI commands, and Python scripts without needing an external SSH client.
Figure 14: Interactive browser xterm.js terminal session operating within JailShell chroot sandbox.
🖥️ Interface Tour & Elements
- Interactive xterm.js Terminal Canvas: Full ANSI color, UTF-8 terminal interface supporting interactive CLI utilities (
nano,htop,git,composer). - Terminal Status Bar: Displays current connection status (
Connected), terminal dimensions (columns x rows), and shell environment (/bin/jailshell). - Session Controls: Buttons to Clear Screen, Reset Terminal, or Disconnect Session.
- JailShell Chroot Security: Isolates the terminal strictly to
/home/user, preventing visibility or traversal into other user directories or server root.
🛠️ Step-by-Step Instructions
Step 1: Launching the Web Terminal
- In the sidebar, click Terminal (icon:
fa-terminal). - The terminal automatically establishes a secure WebSocket connection to the backend PTY daemon.
- You are presented with a bash prompt:
user@server:~$
Step 2: Executing Common Developer Commands
- Navigate to your website root:
cd public_html - Run Composer to install PHP dependencies:
composer install --no-dev --optimize-autoloader - Execute WP-CLI commands:
wp plugin list wp cache flush - Manage Git repositories:
git status git pull origin main
Step 3: Copying and Pasting in Web Terminal
- To Paste: Press
Ctrl + V(Windows) orCmd + V(Mac), or right-click within the terminal canvas. - To Copy: Select text with your mouse; selected text is automatically copied to your clipboard.
⚙️ Complete Field & Parameter Reference Table
| Command / Tool | Availability | Functionality |
|---|---|---|
composer |
Native | Complete PHP package dependency manager. |
wp (WP-CLI) |
Native | Command line interface for WordPress maintenance. |
git |
Native | Distributed version control operations. |
npm / node |
Native | JavaScript runtime and Node package manager. |
python3 / pip |
Native | Python runtime and package management. |
nano / vim |
Native | In-terminal text editors. |
❓ Troubleshooting & Common Errors
1. Terminal Displays "Disconnected / Reconnecting..."
- Cause: WebSocket connection closed due to network interruption or inactivity timeout.
- Solution: Click the Reconnect button in the status bar or refresh the page to spawn a fresh PTY session.
2. Error: "Terminal access is disabled in Demo Mode"
- Cause: Accounts flagged as demo users are restricted from executing shell commands.
- Solution: Upgrade or contact your administrator for standard hosting access.