### Installing Anthias on Raspberry Pi OS or Debian via Script Source: https://github.com/screenly/anthias/blob/master/docs/installation-options.md This command initiates the Anthias installation process on Raspberry Pi OS Lite or Debian by downloading and executing a shell script. It's the quickest way to get started for users who want more control over their digital signage instance. The script will prompt the user for various configuration options during execution. ```Bash $ bash <(curl -sL https://install-anthias.srly.io) ``` -------------------------------- ### Starting Dockerized Development Server (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command initiates the Dockerized development environment for the Anthias server module. It sets up Python 3.11, pyenv, and Poetry inside a Docker container, ensuring a consistent development setup. The server will be accessible at http://localhost:8000 upon successful execution. ```bash ./bin/start_development_server.sh ``` -------------------------------- ### Starting Local Development Server with Docker Compose (Bash) Source: https://github.com/screenly/anthias/blob/master/website/README.md This snippet provides the command to start the local development server for the Anthias website. It uses `docker-compose` with the `docker-compose.website.yml` file to build and bring up the necessary services, making the website accessible at `http://localhost:8080`. ```bash # Start the development server docker-compose -f docker-compose.website.yml up --build # The website will be available at: # http://localhost:8080 ``` -------------------------------- ### Installing Anthias on Raspberry Pi (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command downloads and executes the Anthias installer script directly from the specified URL. It uses 'curl' to fetch the script and 'bash' to run it, streamlining the installation process. ```bash bash <(curl -sL https://install-anthias.srly.io) ``` -------------------------------- ### Installing Poetry Development Dependencies (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command installs only the development host dependencies defined in the project's `pyproject.toml` using Poetry. It's a prerequisite for running the `ruff` linter locally, ensuring all necessary tools are available. ```bash poetry install --only=dev-host ``` -------------------------------- ### Upgrading Screenly Anthias Containers (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This script, located within the Screenly installation directory, is used to re-run the container creation step, which can resolve issues like a black screen after installation or reboot by ensuring containers are properly initialized. ```bash ./screenly/bin/upgrade_containers.sh ``` -------------------------------- ### Launching Raspberry Pi Configuration Utility (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command launches the 'raspi-config' utility, a menu-driven tool for configuring various aspects of the Raspberry Pi, including system options, interfaces, and bootloader settings. ```bash sudo raspi-config ``` -------------------------------- ### Starting NetworkManager TUI (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command launches the NetworkManager Text User Interface (TUI), providing a menu-driven, interactive interface for managing network connections, including Wi-Fi. It serves as a user-friendly alternative to the command-line nmcli tool. ```shell $ sudo nmtui ``` -------------------------------- ### Building Screenly WebView for Raspberry Pi 5 Source: https://github.com/screenly/anthias/blob/master/webview/README.md Similar to the x86 build, this command sequence prepares the environment by setting the Git hash and `COMPOSE_PROFILES` to `pi5`. It then uses Docker Compose to build and start services, followed by executing the `build_webview.sh` script within the `builder-pi5` service to compile WebView specifically for Raspberry Pi 5 devices. ```bash cd webview/ export GIT_HASH=$(git rev-parse --short HEAD) export COMPOSE_PROFILES=pi5 docker compose up -d --build docker compose exec builder-pi5 /scripts/build_webview.sh ``` -------------------------------- ### Building and Starting Test Containers (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This sequence of commands first uses `poetry` to run an image builder script, generating Dockerfiles for specific services (celery, redis, test) without cache mounts. Subsequently, `docker compose` is used to build and start these test-specific containers in detached mode, preparing the environment for running unit tests. ```bash poetry run python -m tools.image_builder \ --dockerfiles-only \ --disable-cache-mounts \ --service celery \ --service redis \ --service test docker compose \ -f docker-compose.test.yml up -d --build ``` -------------------------------- ### Building Screenly WebView for x86 Architecture Source: https://github.com/screenly/anthias/blob/master/webview/README.md This sequence of commands navigates to the `webview` directory, sets the Git hash and `COMPOSE_PROFILES` to `x86`, then uses Docker Compose to build and start the necessary services. Finally, it executes the `build_webview.sh` script within the `builder-x86` service to compile WebView for x86 systems. ```bash cd webview/ export GIT_HASH=$(git rev-parse --short HEAD) export COMPOSE_PROFILES=x86 docker compose up -d --build docker compose exec builder-x86 /scripts/build_webview.sh ``` -------------------------------- ### Performing Full System Upgrade on Raspberry Pi OS (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command performs a full upgrade of the installed packages, including resolving dependencies and removing obsolete packages. The '-y' flag automates confirmation. ```bash sudo apt full-upgrade -y ``` -------------------------------- ### Starting Webpack in Development Mode (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command starts Webpack in development mode within the `anthias-server` Docker container. It enables automatic recompilation of CoffeeScript and SCSS files into JavaScript and CSS upon changes, facilitating front-end development. ```bash docker compose -f docker-compose.dev.yml exec anthias-server \ npm run dev ``` -------------------------------- ### Installing Curl on Debian 12 Source: https://github.com/screenly/anthias/blob/master/docs/x86-installation.md This snippet updates the package list and installs the `curl` utility on a Debian 12 system. `curl` is a prerequisite for downloading the Anthias installation script. ```bash $ sudo apt update $ sudo apt install -y curl ``` -------------------------------- ### Running Qt Builder Container for Raspberry Pi Source: https://github.com/screenly/anthias/blob/master/webview/README.md This command starts a detached Docker container named `qt-builder-instance` from the `qt-builder` image. It mounts local directories for source, build output, and the `webview` project, and allows specifying a `TARGET` platform for the build process. ```bash docker run -itd \ --name qt-builder-instance \ -v ~/tmp/qt-src:/src:Z \ -v ~/tmp/qt-build:/build:Z \ -v $(pwd):/webview:ro \ -e TARGET=${TARGET_PLATFORM} \ qt-builder ``` -------------------------------- ### Accessing Console on Raspberry Pi (Keyboard Shortcut) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This keyboard shortcut switches to the first virtual console (TTY1) on a Linux system, providing a command-line interface. It's useful for troubleshooting when the graphical environment is not working. ```text Ctrl-Alt-F1 ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/screenly/anthias/blob/master/docs/migrating-assets-to-screenly.md Installs all required Python packages for the asset migration script from the 'requirements.local.txt' file into the active virtual environment. This ensures all necessary libraries are available. ```bash $ pip install -r requirements/requirements.local.txt ``` -------------------------------- ### Viewing Raspberry Pi EEPROM Configuration (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command displays the current EEPROM bootloader configuration, including the boot order and other settings. It's useful for verifying changes made with 'rpi-eeprom-config -edit'. ```bash rpi-eeprom-config ``` -------------------------------- ### Starting Raspberry Pi Imager JSON Generator Locally (Bash) Source: https://github.com/screenly/anthias/blob/master/raspberry_pi_imager/README.md This command starts the Raspberry Pi Imager JSON generator locally using Docker Compose. It builds the necessary images and brings up the services defined in `docker-compose.pi-imager.yml`, printing the output to standard output. ```bash # Start the generator docker-compose -f docker-compose.pi-imager.yml up --build # The output will be printed to stdout ``` -------------------------------- ### Updating Raspberry Pi EEPROM Bootloader (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command installs available updates for the Raspberry Pi's EEPROM bootloader. Keeping the bootloader updated is essential for new features and bug fixes, including improved PCIe boot support. ```bash sudo rpi-eeprom-update -a ``` -------------------------------- ### Installing Self-Signed Certificates on Raspberry Pi OS Lite (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Navigates to the Screenly directory and executes a script to install a self-signed certificate. Replace `/path/to/certificate.crt` with the actual path to your certificate file. This functionality is exclusive to Raspberry Pi OS Lite. ```bash cd $HOME/screenly ./bin/add_certificate.sh /path/to/certificate.crt ``` -------------------------------- ### Configuring NOPASSWD Sudo Privilege Source: https://github.com/screenly/anthias/blob/master/docs/x86-installation.md This line, when added to the `sudoers` file, grants the specified user (``) the ability to execute any command with `sudo` privileges without being prompted for a password. This is a common setup for automated scripts or specific system configurations. ```configuration ALL=(ALL) NOPASSWD: ALL ``` -------------------------------- ### Updating Raspberry Pi OS Package Lists (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command updates the list of available packages and their versions from the repositories. The '-y' flag automatically confirms prompts, making it suitable for scripting. ```bash sudo apt update -y ``` -------------------------------- ### Execute Anthias Upgrade Script - Shell Source: https://github.com/screenly/anthias/blob/master/templates/settings.html Runs the Anthias upgrade script, which is a wrapper around the installation script. This script will prompt the user for configuration questions similar to the initial installation. ```Shell ./bin/run_upgrade.sh ``` -------------------------------- ### Example Raspberry Pi Imager OS List JSON Output Source: https://github.com/screenly/anthias/blob/master/raspberry_pi_imager/README.md This JSON object represents an example of the `os_list` structure expected by Raspberry Pi Imager. It contains an array of operating system entries for various Raspberry Pi models, each detailing name, description, icons, website, download URLs, and SHA256 hashes for integrity verification. ```json { "os_list": [ { "name": "Anthias (pi1)", "description": "Anthias, formerly known as Screenly OSE, is the most popular open source digital signage project in the world.", "icon": "https://raw.githubusercontent.com/Screenly/Anthias/master/static/img/square-dark.svg", "website": "https://anthias.screenly.io", "extract_size": 5951425536, "extract_sha256": "a8a1d1efc6c7a5c3ef196b31e9e4be88893328de25e704fb21d2c71f3c150b2c", "image_download_size": 1600981967, "image_download_sha256": "52837c254b2c77fcdaa9319243c26f883f34da0c3051e34b79cc8aec59680d13", "release_date": "2024-12-23", "url": "https://github.com/Screenly/Anthias/releases/download/v0.19.4/2024-12-23-raspberry-pi.zip" }, { "name": "Anthias (pi2)", "description": "Anthias, formerly known as Screenly OSE, is the most popular open source digital signage project in the world.", "icon": "https://raw.githubusercontent.com/Screenly/Anthias/master/static/img/square-dark.svg", "website": "https://anthias.screenly.io", "extract_size": 6193785344, "extract_sha256": "f87e3dff29bba1f95c0c4a45aaa0ea315f1462cefd124976cdbc3f7056f448b5", "image_download_size": 1723178755, "image_download_sha256": "f2096f632c7725b95f234f1bcc60736eb730f2da86c5e41f4ee971137e1a20c1", "release_date": "2024-12-23", "url": "https://github.com/Screenly/Anthias/releases/download/v0.19.4/2024-12-23-raspberry-pi2.zip" }, { "name": "Anthias (pi3)", "description": "Anthias, formerly known as Screenly OSE, is the most popular open source digital signage project in the world.", "icon": "https://raw.githubusercontent.com/Screenly/Anthias/master/static/img/square-dark.svg", "website": "https://anthias.screenly.io", "extract_size": 6186278400, "extract_sha256": "a4302cc7f9b74f56c61c88d2ef1f1d5892b5cbacd5251e9d2ba15639daf127da", "image_download_size": 1732004530, "image_download_sha256": "f7fb3ffe74346838dc42a65776dbd582de5a887339d5379313cd7b7c839a341f", "release_date": "2024-12-23", "url": "https://github.com/Screenly/Anthias/releases/download/v0.19.4/2024-12-23-raspberrypi3.zip" }, { "name": "Anthias (pi4)", "description": "Anthias, formerly known as Screenly OSE, is the most popular open source digital signage project in the world.", "icon": "https://raw.githubusercontent.com/Screenly/Anthias/master/static/img/square-dark.svg", "website": "https://anthias.screenly.io", "extract_size": 6219971072, "extract_sha256": "c11c0904ccbdd8f7e32dd60359dd796d746b59ed9592befdd3e4b165ed1eda9d", "image_download_size": 1736755576, "image_download_sha256": "6cc555f388f77c2ad07c6c8e614f97eb0ce38847626e22613787a12c2968ac8c", "release_date": "2024-12-23", "url": "https://github.com/Screenly/Anthias/releases/download/v0.19.4/2024-12-23-raspberrypi4-64.zip" }, { "name": "Anthias (pi5)", "description": "Anthias, formerly known as Screenly OSE, is the most popular open source digital signage project in the world.", "icon": "https://raw.githubusercontent.com/Screenly/Anthias/master/static/img/square-dark.svg", "website": "https://anthias.screenly.io", "extract_size": 7312135168, "extract_sha256": "53e36a642edb5bbd0258b4df404f3483b8a4511954a025ecc155d1e248f6f1bf", "image_download_size": 1659320107, "image_download_sha256": "a144ea0a308618a60e7f60369c445b3d82b0e75b981ab5780ce78ce6b08df6a7", "release_date": "2024-12-23", "url": "https://github.com/Screenly/Anthias/releases/download/v0.19.4/2024-12-23-raspberrypi5.zip" } ] } ``` -------------------------------- ### Editing Raspberry Pi EEPROM Configuration (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command opens the EEPROM configuration file in the Nano text editor, allowing manual modification of boot parameters like boot order and PCIe probing. It requires root privileges. ```bash sudo rpi-eeprom-config -edit ``` -------------------------------- ### Setting Raspberry Pi Boot Order for PCIe (Configuration) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This configuration line sets the boot order for the Raspberry Pi, prioritizing PCIe boot (0xf6) followed by SD card (1) and then USB (4). It ensures the system attempts to boot from the SSD first. ```text BOOT_ORDER=0xf614 ``` -------------------------------- ### Enabling PCIe Probe on Raspberry Pi (Configuration) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This configuration line enables the Raspberry Pi to probe for PCIe devices during boot. It is necessary for the system to detect and utilize an attached NVMe SSD. ```text PCIE_PROBE=1 ``` -------------------------------- ### Changing User Password on Raspberry Pi (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command allows the user to change their password. It prompts for the current password (if applicable) and then for the new password twice for confirmation. ```bash passwd ``` -------------------------------- ### Navigating to Screenly Directory for Docker Compose (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Changes the current working directory to the Screenly installation path (`/home/${USER}/screenly`). This step is crucial before executing `docker-compose` commands to ensure they operate within the correct context. ```bash cd /home/${USER}/screenly # e.g., /home/pi/screenly if the user is `pi` ``` -------------------------------- ### Checking Raspberry Pi EEPROM Update Status (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/raspberry-pi5-ssd-install-instructions.md This command checks the current version of the Raspberry Pi's EEPROM bootloader and indicates if an update is available. It's crucial for verifying bootloader compatibility, especially for PCIe boot. ```bash sudo rpi-eeprom-update ``` -------------------------------- ### Editing Sudoers File on Debian 12 Source: https://github.com/screenly/anthias/blob/master/docs/x86-installation.md This command opens the `sudoers` file for editing using `visudo`, which provides syntax checking and prevents accidental corruption. It's used to configure `sudo` privileges, specifically to allow a user to run commands without a password. ```bash $ sudo visudo ``` -------------------------------- ### Updating Anthias via Local Upgrade Script (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Executes the local upgrade script located within your Anthias installation directory. This offers an alternative method for updating Anthias, useful when direct internet access for the curl method is not preferred. ```bash $HOME/screenly/bin/run_upgrade.sh ``` -------------------------------- ### Building Qt Builder Docker Image for Raspberry Pi Source: https://github.com/screenly/anthias/blob/master/webview/README.md This command navigates to the `webview` directory and builds the `qt-builder` Docker image using `docker buildx`. It includes the current Git hash as a build argument and loads the image locally. This image is essential for cross-compiling Qt and WebView for Raspberry Pi devices. ```bash cd webview docker buildx build \ --load \ --build-arg GIT_HASH=$(git rev-parse --short HEAD) \ -t qt-builder . ``` -------------------------------- ### Listing Available Wi-Fi Networks with nmcli (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command scans for and displays a list of all available Wi-Fi access points in the vicinity, showing their SSIDs, signal strength, and security types. Users can identify the desired network's SSID for subsequent connection steps. ```shell $ nmcli dev wifi list ``` -------------------------------- ### Executing WebView Build Script in Qt Builder Container Source: https://github.com/screenly/anthias/blob/master/webview/README.md This command executes the `build_webview_with_qt5.sh` script inside the running `qt-builder-instance` container. This script initiates the actual build process for Qt and WebView, targeting Raspberry Pi boards, with results placed in `~/tmp/qt-build/`. ```bash docker exec -it qt-builder-instance /webview/build_webview_with_qt5.sh ``` -------------------------------- ### Loading Page via DBus in Python Source: https://github.com/screenly/anthias/blob/master/webview/README.md This Python snippet demonstrates how to interact with the Screenly WebView via DBus. It connects to the session bus, retrieves the `screenly.webview` object at the `/Screenly` address, and then calls the `loadPage` method to instruct the WebView to load a specified URL. ```python from pydbus import SessionBus bus = SessionBus() browser_bus = bus.get('screenly.webview', '/Screenly') browser_bus.loadPage("www.example.com") ``` -------------------------------- ### Project Directory Structure (Text) Source: https://github.com/screenly/anthias/blob/master/website/README.md This snippet illustrates the directory structure of the `website/` folder. It shows the location of static assets, the Docker Compose configuration file for local development, and the main HTML content file. ```text website/ ├── assets/ # Static assets (images, styles) ├── docker-compose.website.yml # Docker Compose file for local development └── index.html # Main website content ``` -------------------------------- ### Building/Upgrading Containers for Production (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command initiates the build or upgrade process for Anthias containers, specifically in a production context. It leverages the previously generated Dockerfiles to create or update the necessary Docker images on the Raspberry Pi. ```bash MODE=build \ ./bin/upgrade_containers.sh ``` -------------------------------- ### Securely Connecting to Wi-Fi with nmcli (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command connects to a specified Wi-Fi network by prompting the user to enter the password securely, preventing it from being exposed in command history. This is the recommended method for establishing a Wi-Fi connection. ```shell $ sudo nmcli --ask dev wifi connect $WIFI_SSID ``` -------------------------------- ### Enabling Qt Debug Logging Source: https://github.com/screenly/anthias/blob/master/webview/README.md This bash command sets the `QT_LOGGING_RULES` environment variable to enable detailed logging for Qt's platform abstraction (QPA) layer. This is useful for debugging issues related to Qt's rendering or windowing system interactions. ```bash export QT_LOGGING_RULES=qt.qpa.*=true ``` -------------------------------- ### Cloning the Anthias Repository (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This sequence of commands navigates to a specified workspace directory, clones the Anthias GitHub repository into it, and then changes the current directory into the newly cloned `Anthias` directory. This prepares the local environment for deploying the Anthias application to a Balena fleet. ```Bash $ cd $WORKSPACE_DIRECTORY $ git clone git@github.com:Screenly/Anthias.git $ cd Anthias/ ``` -------------------------------- ### Initializing Google Analytics for Demo Instances in JavaScript Source: https://github.com/screenly/anthias/blob/master/templates/head.html This JavaScript snippet initializes Google Analytics (gtag.js) for tracking. It is conditionally executed only if the `context.is_demo` flag is true, ensuring analytics are collected specifically for demo environments. It sets up the `dataLayer` and configures tracking for the specified Google Analytics property ID. ```JavaScript window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'UA-37846380-3'); ``` -------------------------------- ### Stopping and Removing Qt Builder Container Source: https://github.com/screenly/anthias/blob/master/webview/README.md These commands are used to gracefully stop and then remove the `qt-builder-instance` Docker container after the build process is complete. This frees up resources and cleans up the Docker environment. ```bash docker stop qt-builder-instance docker rm qt-builder-instance ``` -------------------------------- ### Checking Wi-Fi Interface IP Address with ip (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command displays detailed information about the 'wlan0' network interface, including its assigned IPv4 address. The presence of an IP address confirms a successful Wi-Fi connection and proper network configuration. ```shell $ ip addr show wlan0 ``` -------------------------------- ### Verifying Balena Fleet Configuration Variables (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This command lists the host configuration environment variables for a specified Balena fleet. It allows users to confirm that previously added or modified settings, such as GPU memory or display overlays, have been successfully applied and are visible at the fleet level. ```Bash balena envs --fleet $FLEET_NAME --config ``` -------------------------------- ### Checking Wi-Fi Device Status with nmcli (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command checks the current status of network devices, specifically to determine if the Wi-Fi interface (wlan0) is enabled, disconnected, or unavailable. It helps in diagnosing the initial state of the Wi-Fi hardware. ```shell $ nmcli dev status ``` -------------------------------- ### Verifying Internet Connectivity with Ping (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command sends ICMP echo requests to a specified host (e.g., google.com or 1.1.1.1) to verify active internet connectivity after a Wi-Fi connection attempt. A successful response indicates that the device is online and can reach external networks. ```shell $ ping google.com ``` -------------------------------- ### Cloning Anthias Repository - Bash Source: https://github.com/screenly/anthias/blob/master/CONTRIBUTING.md This snippet provides the bash commands required to clone a forked Anthias repository from GitHub and navigate into its directory. This is a fundamental first step for local development and contribution to the project. ```bash git clone https://github.com/your-username/Anthias.git cd Anthias ``` -------------------------------- ### Connecting to Wi-Fi with nmcli (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command connects to a specified Wi-Fi network using its SSID and password provided directly in the command line. While functional, it is generally not recommended for security reasons as the password may be stored in command history. ```shell $ sudo nmcli dev wifi connect $WIFI_SSID password $WIFI_PASSWORD ``` -------------------------------- ### Setting WebView Debug Environment Variables (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md These commands set environment variables to enable detailed logging and debugging for the Anthias WebView, which is based on the Qt toolkit. `QT_LOGGING_DEBUG` enables general debug logging, `QT_LOGGING_RULES` specifies which debug messages to show, and `QT_QPA_EGLFS_DEBUG` enables EGLFS-specific debugging, aiding in troubleshooting rendering issues. ```bash export QT_LOGGING_DEBUG=1 export QT_LOGGING_RULES="*.debug=true" export QT_QPA_EGLFS_DEBUG=1 ``` -------------------------------- ### Deploying Anthias to Balena Fleet (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This command executes the `deploy_to_balena.sh` script to deploy the Anthias application to a specified Balena fleet. It requires the `--board` type (e.g., `pi4`) and the `--fleet` name as parameters. The script pulls the latest Docker images from Docker Hub, pushes them to the BalenaCloud account, creates a new release, and deploys it to the fleet. ```Bash $ ./bin/deploy_to_balena.sh \ --board $BOARD_TYPE \ --fleet $FLEET_NAME \ ``` -------------------------------- ### Navigate to Project Root and Create Virtual Environment Source: https://github.com/screenly/anthias/blob/master/docs/migrating-assets-to-screenly.md Changes the current directory to the Screenly project root and creates a Python virtual environment named 'venv'. This isolates project dependencies and should be done if not already present. ```bash $ cd ~/screenly $ python -m venv venv/ ``` -------------------------------- ### Configuring Balena Fleet GPU Memory and Display Overlay (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This snippet adds two host configuration environment variables to a Balena fleet using the `balena env add` command. `BALENA_HOST_CONFIG_gpu_mem` sets the GPU memory value, crucial for video playback, while `BALENA_HOST_CONFIG_dtoverlay` enables the `vc4-kms-v3d` display overlay. These settings are applied fleet-wide. ```Bash $ balena env add BALENA_HOST_CONFIG_gpu_mem $GPU_MEM_VALUE --fleet $FLEET_NAME $ balena env add BALENA_HOST_CONFIG_dtoverlay vc4-kms-v3d --fleet $FLEET_NAME ``` -------------------------------- ### Running Integration Tests (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command executes the integration tests for the Anthias project, specifically targeting tests tagged as 'integration'. It runs the Django `manage.py test` command inside the `anthias-test` Docker container, allowing for testing interactions between different components. ```bash docker compose \ -f docker-compose.test.yml \ exec anthias-test ./manage.py test --tag=integration ``` -------------------------------- ### Pushing Git Release Tag to Origin (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command pushes the newly created local Git tag to the remote `origin` repository. This makes the release tag available to others and visible in the remote repository's tag list. ```bash git push origin v0.18.7 ``` -------------------------------- ### Creating New Git Release Tag (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command creates an annotated Git tag with a specified version number and message. It's used to mark a specific commit as a new release, providing a descriptive message for the tag. ```bash git tag -a v0.18.7 -m "Test new automated disk images" ``` -------------------------------- ### Running Python Linter with `act` (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command uses `act` to run the Python linter defined in the GitHub Actions workflow file locally. It's useful for testing the CI/CD pipeline's linting step without pushing changes to the remote repository. ```bash act -W .github/workflows/python-lint.yaml ``` -------------------------------- ### Generating Dev Mode Dockerfiles for Production (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command generates development-mode Dockerfiles, specifically configured for a production environment. It's a prerequisite for building containers on a Raspberry Pi, ensuring the correct environment variables are set for the build process. ```bash ENVIRONMENT=production \ ./bin/generate_dev_mode_dockerfiles.sh ``` -------------------------------- ### Enabling Wi-Fi Radio with nmcli (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command enables the Wi-Fi radio interface if it is currently disabled, making it available for scanning and connecting to wireless networks. It is a necessary step if the Wi-Fi interface is reported as 'disabled'. ```shell $ nmcli radio wifi on ``` -------------------------------- ### Connecting to Raspberry Pi via SSH (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Establishes an SSH connection to the Raspberry Pi. Replace `pi` with your username and `raspberrypi` with the device's hostname or IP address. This is the initial step for remote access. ```bash ssh pi@raspberrypi ``` -------------------------------- ### Stopping x86 Docker Compose Services Source: https://github.com/screenly/anthias/blob/master/webview/README.md This command stops and removes all services, networks, and volumes defined in the Docker Compose configuration for the x86 build environment. It's used to clean up the build environment after the process is complete. ```bash docker compose down ``` -------------------------------- ### Activate Python Virtual Environment Source: https://github.com/screenly/anthias/blob/master/docs/migrating-assets-to-screenly.md Activates the previously created Python virtual environment. This step is crucial and must be performed every time before running the asset migration script to ensure correct dependency resolution. ```bash $ source ./venv/bin/activate ``` -------------------------------- ### Run Asset Migration Script Source: https://github.com/screenly/anthias/blob/master/docs/migrating-assets-to-screenly.md Executes the Python script responsible for migrating assets from Anthias to Screenly. Users will be prompted for necessary credentials like the Screenly API key and Anthias username/password during its execution. ```bash $ python tools/migrate_assets_to_screenly.py ``` -------------------------------- ### Initializing Google Analytics gtag.js Source: https://github.com/screenly/anthias/blob/master/website/index.html This JavaScript snippet initializes the Google Analytics `gtag.js` library, setting up the `dataLayer` array and defining the `gtag` function. It then sends a 'js' command with the current date and configures Google Analytics with the specified measurement ID 'G-W6BH3H6SZ6', enabling data collection for the associated property. ```JavaScript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-W6BH3H6SZ6'); ``` -------------------------------- ### Navigate to Anthias Project Root - Shell Source: https://github.com/screenly/anthias/blob/master/templates/settings.html Changes the current directory to the Anthias project root, typically located in the user's home directory. This step is required before executing the upgrade script. ```Shell cd ~/screenly ``` -------------------------------- ### Updating Anthias via Online Script (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Downloads and executes the official Anthias installation/update script directly from the internet. This command provides a convenient way to upgrade your Anthias instance to the latest version. ```bash bash <(curl -sL https://install-anthias.srly.io) ``` -------------------------------- ### Running Unit Tests (Excluding Integration) (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command executes the unit tests for the Anthias project, specifically excluding tests tagged as 'integration'. It runs the Django `manage.py test` command inside the `anthias-test` Docker container, ensuring only pure unit tests are performed. ```bash docker compose \ -f docker-compose.test.yml \ exec anthias-test ./manage.py test --exclude-tag=integration ``` -------------------------------- ### Configuring Jasmine Test Environment in JavaScript Source: https://github.com/screenly/anthias/blob/master/static/spec/runner.html This snippet initializes the Jasmine testing environment, sets the update interval, adds `TrivialReporter` and `ConsoleReporter`, and configures a spec filter. It also ensures that `jasmineEnv.execute()` runs after any existing `window.onload` handlers, making it suitable for browser-based test execution. ```JavaScript var defaultDuration = 10; var use24HourClock = false; var dateFormat = "mm/dd/yyyy"; (function() { var jasmineEnv = jasmine.getEnv(); window.jenv = jasmineEnv; jasmineEnv.updateInterval = 2000; var trivialReporter = new jasmine.TrivialReporter(); jasmineEnv.addReporter(trivialReporter); jasmineEnv.addReporter(new jasmine.ConsoleReporter()); jasmineEnv.specFilter = function(spec) { return trivialReporter.specFilter(spec); }; var currentWindowOnload = window.onload; window.onload = function() { if (currentWindowOnload) { currentWindowOnload(); } jasmineEnv.execute(); }; })(); ``` -------------------------------- ### Including Template Blocks and Files - Jinja2/Django Source: https://github.com/screenly/anthias/blob/master/templates/base.html This snippet demonstrates the use of template inheritance and inclusion in a templating language like Jinja2 or Django. It includes 'head.html' and 'header.html' files and defines 'head' and 'content' blocks, allowing child templates to extend and override these sections. ```Jinja2/Django Template Language {% include "head.html" %} {% block head %} {% endblock %} {% include 'header.html' %} {% block content %} {% endblock %} ``` -------------------------------- ### Running Ruff Linter on All Python Files (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command executes the `ruff` linter across all Python files in the current directory and its subdirectories. It's used to check the entire Python codebase for style and quality issues as configured by `ruff`. ```bash poetry run ruff check . ``` -------------------------------- ### Disconnecting from Wi-Fi with nmcli (Shell) Source: https://github.com/screenly/anthias/blob/master/docs/wifi-setup.md This command deletes the stored connection profile for a specified Wi-Fi network, effectively disconnecting the device from that network and preventing automatic reconnection in the future. ```shell $ sudo nmcli connection delete $WIFI_SSID ``` -------------------------------- ### Viewing Specific Service Logs with Docker Compose (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Displays real-time logs for a specified Docker Compose service. Replace `${SERVICE_NAME}` with the desired service name (e.g., `anthias-server`). The `-f` flag ensures continuous log streaming for monitoring. ```bash docker compose logs -f ${SERVICE_NAME} # e.g., docker compose logs -f anthias-server ``` -------------------------------- ### Running Ruff Linter on Specific Python File (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command runs the `ruff` linter on a single, specified Python file. It's useful for quickly checking a particular file for linting errors without scanning the entire project. ```bash poetry run ruff check /path/to/file.py ``` -------------------------------- ### Viewing Specific Container Logs with Docker (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/README.md Displays real-time logs from a specified Docker container, such as `screenly-anthias-server-1`. The `-f` flag enables following the log output. Replace the container name to view logs from other services. ```bash docker logs -f screenly-anthias-server-1 ``` -------------------------------- ### Checking Latest Git Release Tag (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This sequence of commands first pulls the latest changes from the remote repository and then lists all existing Git tags. It helps identify the most recent release version before creating a new one. ```bash git pull git tag ``` -------------------------------- ### SSH to Raspberry Pi Source: https://github.com/screenly/anthias/blob/master/docs/migrating-assets-to-screenly.md Connects to the Raspberry Pi running Anthias via SSH. This is the initial step to gain command-line access to the device for further operations. ```bash $ ssh pi@raspberrypi ``` -------------------------------- ### Deploying Local Anthias Changes to Balena Fleet (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This command executes the `deploy_to_balena.sh` script with the `--dev` flag to deploy local Anthias changes to a specified Balena fleet. This is used when developers want to push their current local modifications rather than the latest official Docker images, facilitating rapid iteration and testing. ```Bash # Take note of the --dev flag. $ ./bin/deploy_to_balena.sh \ --board $BOARD_TYPE \ --fleet $FLEET_NAME \ --dev ``` -------------------------------- ### Styling for Access Denied Page Elements (CSS) Source: https://github.com/screenly/anthias/blob/master/webview/res/access_denied.html This CSS snippet defines the visual appearance of an access denied page. It includes font face declarations for Roboto, sets the background color, and styles various elements like the logo, central content block, headings, and descriptive paragraphs, ensuring a consistent look and feel. ```CSS @font-face {\n font-family: Roboto;\n src: url('google-roboto-regular-webfont.woff2') format('woff2'), url('google-roboto-regular-webfont.woff') format('woff');\n font-weight: normal;\n font-style: normal;\n}\nbody {\n background-color: #ecebe5;\n}\nb {\n font-weight: bold;\n}\n.logo {\n position: absolute;\n width: 138px;\n right: 34px;\n top: 32px;\n}\n.center {\n position: absolute;\n top: 38%;\n left: 36%;\n width: 640;\n}\nh1 {\n margin: 0;\n font-size: 32px;\n font-weight: 100;\n color: rgba(0, 0, 0, 0.8);\n margin-top: -5px;\n}\n.description {\n font-family: Roboto, Helvetica, Arial, sans-serif;\n}\n.description p {\n font-size: 18px;\n line-height: 21px;\n color: rgba(0, 0, 0, 0.54);\n margin: 3px 0px 5px 0;\n}\n.description a {\n text-decoration: none;\n color: #0779F9;\n}\n.lock {\n float: left;\n width: 85px;\n margin-right: 20px;\n} ``` -------------------------------- ### Loading Static Files in Django Template Source: https://github.com/screenly/anthias/blob/master/templates/head.html This Django template tag loads the 'static' tag library, which is essential for using the `{% static %}` template tag to correctly reference static assets like CSS, JavaScript, or images within Django templates. ```Django Template {% load static %} ``` -------------------------------- ### Deploying Anthias with Custom Shared Memory Size (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This command executes the `deploy_to_balena.sh` script, allowing the user to specify a custom shared memory size for the deployed application using the `--shm-size` flag. This is useful for optimizing performance or addressing memory-related issues, as the default shared memory size is 256MB. ```Bash $ ./bin/deploy_to_balena.sh \ --board $BOARD_TYPE \ --fleet $FLEET_NAME \ --shm-size 512mb ``` -------------------------------- ### Disabling Overscan on Balena Fleet (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/balena-fleet-deployment.md This command adds a host configuration environment variable to disable overscan on devices within a specified Balena fleet. Setting `BALENA_HOST_CONFIG_disable_overscan` to `1` helps resolve issues with black borders around the screen, ensuring the display fills the entire screen area. ```Bash $ balena env add BALENA_HOST_CONFIG_disable_overscan 1 --fleet $FLEET_NAME ``` -------------------------------- ### Highlighting Active Navigation Link - JavaScript/jQuery Source: https://github.com/screenly/anthias/blob/master/templates/base.html This JavaScript snippet, likely using jQuery, dynamically adds an 'active' class to the navigation link () whose 'href' attribute matches the current window's pathname. Simultaneously, it removes the 'active' class from all other navigation links, commonly used to highlight the current page in a navigation bar. ```JavaScript $(".navbar .nav li a").removeClass('active'); $(".navbar .nav li a\[href='" + window.location.pathname + "'\]").addClass('active'); ``` -------------------------------- ### Styling HTML and Body Elements with CSS Source: https://github.com/screenly/anthias/blob/master/templates/splash-page.html This CSS snippet sets the height of the HTML and body elements to 100% and hides vertical overflow, ensuring the page content fits within the viewport without scrolling. ```CSS html, body { height: 100%; overflow-y: hidden; } ``` -------------------------------- ### Stopping Dockerized Development Server (Docker Compose) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command stops and removes the containers defined in docker-compose.dev.yml, effectively shutting down the Anthias development server and its associated services. It cleans up the running Docker environment. ```docker compose docker compose -f docker-compose.dev.yml down ``` -------------------------------- ### Deleting Local Git Release Tag (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command deletes a specified Git tag from the local repository. It's used to remove a tag that might have been created in error or is no longer needed locally. ```bash git tag -d v0.18.5 ``` -------------------------------- ### SSH to Anthias Device - Shell Source: https://github.com/screenly/anthias/blob/master/templates/settings.html Connects to the Anthias device via SSH using the provided host user and IP address. This command is part of the manual upgrade process, allowing remote access to the device's terminal. ```Shell ssh {{ context.host_user }}@{{ ip_address }} ``` -------------------------------- ### Deleting Remote Git Release Tag (Bash) Source: https://github.com/screenly/anthias/blob/master/docs/developer-documentation.md This command deletes a specified Git tag from the remote `origin` repository. It's used to remove a tag that was pushed in error or needs to be retracted from the remote. ```bash git push --delete origin v0.18.5 ``` -------------------------------- ### Styling HTML and Body for Full Height and Hidden Overflow (CSS) Source: https://github.com/screenly/anthias/blob/master/templates/hotspot.html This CSS snippet ensures that the `html` and `body` elements occupy 100% of the viewport height and prevents vertical scrolling. This is commonly used for full-page applications or splash screens where content should fit within the visible area without overflow. ```CSS html, body { height: 100%; overflow-y: hidden; } ``` -------------------------------- ### Conditionally Displaying Player Name in Django Template Source: https://github.com/screenly/anthias/blob/master/templates/head.html This Django template snippet dynamically sets the HTML page title. If the `context.player_name` variable is available, it appends the player's name to 'Anthias - '; otherwise, it defaults the title to 'Anthias'. ```Django Template {% if context.player_name %} Anthias - {{ context.player_name }} {% else %} Anthias {% endif %} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.