User Manual

Smart Terminal

This manual describes how to use the Smart Terminal to connect to devices, execute commands, review results, and manage your session effectively.

Smart Terminal

Summary

The Smart Terminal is your primary interface for interacting with connected devices. It provides an intelligent chat-like environment where you can enter commands, receive clear results, and even review proposed actions. You can manage your terminal session, activate special permissions, and switch between an intelligent view and a raw SSH console. The terminal assists you by highlighting commands that require special attention, such as administrator privileges or user input, and allows for automated execution sequences.

Page Access

You can access this page by navigating to: /devices_connect

Page Functionalities

  • Intelligent Terminal Indicator: A text label at the top indicating you are in the intelligent terminal mode.
  • Administrator User Toggle: An icon (a shield) that allows you to activate or deactivate administrator (sudo) privileges for your commands.
  • Disconnect Terminal Session: An icon (an exit door) to safely end your current connection to the device.
  • Show SSH Console: An icon (a console window) to switch to the raw SSH console view, which displays all SSH output directly.
  • Command Input Field: A text box labeled "Enter a prompt or text" where you can type your commands or instructions.
  • Send Button: An icon (a paper airplane) next to the command input field to submit your typed command. When processing, it changes to a spinning circle.
  • Chat History Area: Displays a chronological log of all commands you have entered and their results.
  • Proposed Command List: If the terminal suggests multiple commands based on your input, they will appear in a list for your review.
    • Edit Command Field: Each proposed command has a text box allowing you to modify it before execution.
    • Remove Command Button: An icon (a trash can) to delete a proposed command from the list.
    • Play Command Button: An icon (a play arrow) next to each command to execute it individually.
  • Warning Indicators: Important alerts that appear above proposed commands:
    • Root Access Required: Informs you if a command needs administrator privileges.
    • User Input Required: Alerts you if a command will prompt you for additional information during its execution.
    • Delete Operations Detected: Warns you if commands might delete files or data.
  • Autoplay Status Indicator: Shows whether the 'Autoplay' feature is currently active or not. Clicking it allows you to access Terminal Options for configuration.
  • Save as Script Button: An icon (a floppy disk) to save all generated commands into a single script file.
  • Play All Commands Button: An icon (a playlist play) to execute all proposed commands one after another.
  • Review and Update Section:
    • Additional Change Requests Field: A text box where you can type further instructions or modifications for the proposed commands.
    • Review and Update Commands Button: An icon (a refresh arrow) to apply your changes or additional requests to the generated command list.
  • Result Summary: Displays a concise overview of the command's outcome.
  • Expand/Collapse Details Button: Allows you to show or hide the detailed, structured (JSON) output of a command result.

Scenario Executions

Possible usage steps within this page

Here are common ways you can use the Smart Terminal to achieve your tasks:

  • Execute a simple command:

    Type a command like ls -l into the command input field at the bottom of the screen. Then, press the Enter key on your keyboard or click the 'Send' (paper airplane) button. The terminal will execute the command on the connected device, and its output will be displayed in the chat history area.

  • Activate Administrator Privileges:

    If you need to run commands that require special permissions (like installing software), click the 'Administrator User Toggle' (shield icon) in the header. If the system prompts you, confirm the activation. This will grant you temporary elevated permissions for your commands.

  • Review and Modify Proposed Commands:

    After entering a prompt (e.g., "install Apache web server"), the terminal might suggest a series of commands. These will appear in the "Proposed commands" list. You can review each command, edit it directly in its text field, remove it using the 'Remove Command' (trash can) icon, or execute individual commands with the 'Play Command' (play arrow) icon next to them.

  • Save Commands as a Script:

    Once you are satisfied with a list of proposed commands, you can save them for later use. Click the 'Save as script' (floppy disk) icon. A dialog will appear asking you to enter a filename (e.g., install_apache). Enter your desired name and confirm. The script will be saved to the device.

  • Execute All Proposed Commands:

    To run all proposed commands sequentially, click the 'Play All Commands' (playlist play) icon. The terminal will execute them one after another. Execution will stop automatically if any command encounters an error.

  • Switch to Raw SSH Console:

    If you prefer to see the direct, unfiltered output from the device, click the 'Show SSH Console' (console window) icon in the header. You will be taken to a raw SSH terminal view. To return to the intelligent terminal, look for a similar button or option within the raw console interface.

  • Clear Terminal History:

    To remove all previous commands and their results from the chat history, look for a 'Clear Terminal' option (often found within a menu or represented by a trash can icon). Clicking this will reset the display.

  • Disconnect from Device:

    When you are finished, click the 'Disconnect Terminal Session' (exit door) icon in the header. A confirmation message will appear, and your connection to the device will be safely closed.

Possible errors which may occur on this page

Understanding potential issues can help you troubleshoot effectively:

  • Command Requires Administrator (Root) Access:

    If a command you execute requires administrator privileges (e.g., apt update to update system packages) and you have not activated the 'Administrator User Toggle' (shield icon), the command will likely fail with a "Permission denied" error. To fix this, simply activate the administrator user mode before running such commands.

  • Command Requires User Input:

    Some commands might need you to provide additional information during their execution, such as a password or a 'yes/no' confirmation. If the "User input required" warning is displayed and you proceed without preparing for this, the command might stop or fail. Ensure you know what input is expected; sometimes you can include the input directly in the command (e.g., adding -y for "yes" confirmation), or be ready to type it if the terminal supports interactive prompts.

  • Session Disconnection due to Inactivity:

    If your terminal session remains idle for an extended period without any activity, the connection might automatically close to save resources. If this happens, you will need to reconnect to the device to continue your work. While the system sends "keep-alive" signals, very long periods of no user interaction can still lead to a disconnection.