User Interface

Terminal Access

The dxflow terminal provides a command-line interface to interact with the dxflow engine, allowing you to execute commands, manage workflows, and access system functionalities directly from your terminal.

The Terminal Access section of the dxflow interface provides a powerful web-based terminal that connects you directly to containerized environments. This feature enables command-line interaction with your workflows, applications, and the underlying system infrastructure.

Overview

The Terminal interface offers comprehensive command-line access:

Web Terminal

Browser-Based Access

  • Full-featured terminal in your browser
  • No additional software required
  • Cross-platform compatibility
  • Secure WebSocket connections

Container Access

Direct Container Shell

  • Connect to running containers
  • Debug applications in real-time
  • Access container filesystems
  • Execute container commands

Multi-Session

Session Management

  • Multiple concurrent terminals
  • Persistent sessions
  • Auto-reconnection support
  • Session sharing capabilities

Security

Secure Access

  • Encrypted connections
  • Role-based permissions
  • Audit logging
  • Resource limitations

Key Features

Web Terminal Interface

The web-based terminal provides a native command-line experience:

Native Terminal Experience

  • Full VT100/xterm Compatibility: Support for all standard terminal features
  • Unicode Support: Full UTF-8 character set support
  • Resize Handling: Automatic terminal resizing based on browser window
  • Copy/Paste: Standard keyboard shortcuts and context menu support
  • WebSocket Communication: Real-time bidirectional terminal communication

Shell Management

Shell Session Creation

Web Interface Options:

New Shell

Quick Start

  • Click "New Terminal" button
  • Auto-configured environment
  • Default shell selection
  • Instant connection

Custom Shell

Advanced Configuration

  • Choose shell type (bash, zsh, sh)
  • Set working directory
  • Configure environment variables
  • Custom resource limits

Container Shell

Container Access

  • Select running container
  • Auto-detect shell type
  • Container-specific environment
  • Isolated filesystem access

Session Management

Each shell session includes:

  • Unique Identity: Auto-generated or custom session identifier
  • WebSocket Connection: Real-time bidirectional communication
  • Session State: Tracks running processes and command history
  • Resource Monitoring: CPU and memory usage tracking

Terminal Operations

Interactive Shell Usage

Run Commands

# Basic commands
pwd                    # Show current directory
ls -la                 # List files and directories
cd /path/to/dir       # Change directory
cat filename          # View file contents

# Process management
ps aux                # View running processes
top                   # Real-time process monitor
kill -9 PID          # Terminate process

# File operations
touch newfile        # Create new file
mkdir newdir         # Create directory
cp source dest       # Copy files
mv old new          # Move/rename files
rm filename         # Delete files

Container Shell Access

Containerized Environment Access

Running Containers

Active Containers

  • Access application containers
  • Debug running services
  • View container logs
  • Inspect processes

Service Containers

Infrastructure Access

  • Database shells (MySQL, PostgreSQL)
  • Cache services (Redis, Memcached)
  • Message queues (RabbitMQ, Kafka)
  • Custom services

Development Environments

Dev Tools

  • Language-specific shells
  • Package managers
  • Build tools
  • Debugging utilities

Session Management

Multi-Session Support

Manage Sessions

  • Multiple Terminals: Open unlimited concurrent sessions
  • Session Persistence: Sessions survive browser refreshes
  • Auto-reconnection: Automatic reconnection on network issues
  • Session Sharing: Collaborate with team members

API Integration

WebSocket Connection

The terminal uses WebSocket connections for real-time communication:

Connection Endpoints

# WebSocket connection to specific shell session
GET /api/shell/:identity/

Session Management API

# Shell operations
GET    /api/shell/           # List all active shell sessions
POST   /api/shell/           # Create new shell session
PUT    /api/shell/resize/    # Resize terminal dimensions
PUT    /api/shell/execute/   # Execute commands programmatically
PUT    /api/shell/kill/      # Kill processes in shell
DELETE /api/shell/           # Remove shell session

Getting Started

Step 1: Access Terminal

After logging in, navigate to the "Terminal Access" section from the main menu.

Step 2: Create Your First Shell

  1. Click "New Terminal" to create a new shell session
  2. Choose environment:
    • System shell (direct access to host system)
    • Container shell (access to running container)
    • Custom environment (specific working directory or user)
  3. Configure session (optional):
    • Set working directory
    • Configure environment variables
    • Choose shell type (bash, zsh, sh)

Step 3: Basic Terminal Usage

Once connected to a shell session:

Essential Commands

pwd                  # Show current directory
ls -la              # List files and directories
cd /path            # Change directory
cat filename        # View file contents
nano filename       # Edit files
ps aux              # View running processes
top                 # Real-time process monitor

File Management

touch filename      # Create new file
mkdir dirname       # Create directory
cp source dest      # Copy files
mv old new         # Move/rename files
rm filename        # Delete files

Advanced Usage

Screen and Tmux

For persistent sessions beyond browser connections:

# Screen commands
screen -S session_name    # Create named session
screen -ls               # List sessions
screen -r session_name   # Reattach to session
Ctrl+A, D               # Detach from session

Best Practices

Security Guidelines

  • Use appropriate user permissions for different tasks
  • Avoid running unnecessary services as root user
  • Regular cleanup of temporary files and processes
  • Monitor resource usage to prevent system overload
  • Enable audit logging for compliance requirements

Troubleshooting

Connection Issues?
  • Check if the dxflow engine is running: dxflow ping
  • Verify WebSocket connectivity in browser console
  • Ensure firewall allows WebSocket connections
  • Try refreshing the browser or creating a new session

Common Issues

  • Session Timeout: Sessions may timeout after extended inactivity. Refresh the page to reconnect.
  • Copy/Paste Issues: Use Ctrl+Shift+C/V or right-click context menu for clipboard operations.
  • Display Problems: Resize the terminal window or use reset command to fix display issues.
  • Permission Denied: Ensure proper user permissions for the requested operations.

The Terminal Access interface provides direct shell access to your dxflow environment, enabling powerful command-line operations, debugging capabilities, and system administration tasks through an intuitive web-based terminal.