Crateria Brand Header

Introduction

Welcome to the central documentation portal for the Crateria open-source software suite. Crateria delivers high-performance, security-hardened utility programs built entirely in Rust.

Our tools feature native integrations with Wayland and the COSMIC Desktop environment, alongside state-of-the-art sandboxing technologies.

Product Directory

Application Type Architecture Focus
Trance Daemon / UIs Wayland-native screensaver runner with isolated dynamic loaders.
Morphball CLI / TUI Secure archiver using Landlock-enforced decompression sandboxes.

System Installation

Install Crateria packages directly using signed repositories for APT and DNF package managers.

Fedora (DNF Setup)

Step 1: Download the repository configuration

sudo curl -fsSL https://crateria.github.io/packages/rpm/crateria.repo -o /etc/yum.repos.d/crateria.repo

Step 2: Install the packages

sudo dnf install trance morphball

Debian / Ubuntu / Pop!_OS (APT Setup)

Step 1: Create the keyrings directory

sudo mkdir -p /etc/apt/keyrings

Step 2: Download the GPG keyring

sudo curl -fsSL https://crateria.github.io/packages/apt/crateria-keyring.gpg -o /etc/apt/keyrings/crateria.gpg

Step 3: Register the repository source list

echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/crateria.gpg] https://crateria.github.io/packages/apt stable main" | sudo tee /etc/apt/sources.list.d/crateria.list

Step 4: Update package lists

sudo apt update

Step 5: Install the packages

sudo apt install trance morphball

About Crateria

Crateria is a project dedicated to building a memory-safe, security-hardened Linux desktop utility suite. All core components are written in Rust and follow a strict privilege-separation model.

Organization Map

The Crateria ecosystem is divided into the following specialized repositories:

Repository Description Role
trance Screensaver daemon & Wayland client components. Core Application
morphball Secure file archiver featuring Landlock sandboxes. Core Application
packages APT and DNF package distribution repository. Distribution
trance-plugins Modular screen saver dynamic library plugins. Extensions
brand Organization assets and design files. Design

Contributing & Policies

Development is hosted publicly on GitHub. Please submit pull requests to the individual project repositories. Contributions are governed by the Apache-2.0 license and the organization contributing guides.

Trance Command Line (CUI)

The trance CLI tool is a non-interactive client designed for scripting, quick configuration edits, and querying daemon metrics directly from a terminal or system hooks.

Command Reference

Command Syntax Alias Description
trance status [--json] st Queries the background daemon via D-Bus and displays the system lock state, battery info, and running metrics.
trance list ls Scans the system directories and lists all dynamically loaded screensaver plugins.
trance preview <saver> p Spawns a fullscreen window to test the specified screensaver immediately.
trance stop - Instructs the daemon to kill the active screensaver window.
trance enable / disable on / off Toggles whether the daemon registers idle inputs to trigger screensavers.
trance timeout <minutes> t Sets the idle duration threshold (1 to 240 minutes).
trance saver <name> - Updates the default active screensaver.
trance doctor doc Runs system diagnostics (checks compositor handles, D-Bus session state, and library paths).

Trance Terminal UI (TUI)

Trance includes an interactive terminal user interface for real-time monitoring and layout configuration, avoiding the need to remember manual commands.

Launching the TUI Dashboard

To run the full terminal user interface console, execute:

trance-tui

TUI Features

Configuration Helper

Why Configure Trance?

Trance is designed to run silently as a background service. Adjusting configurations allows users to optimize performance (such as lowering rendering scale on low-end GPUs), customize idle timeout triggers, choose specific screensaver plugins, or toggle the FPS counter overlay for debugging.

Configure Trance by editing ~/.config/trance/config.toml or generate a config dynamically using the wizard below:


                

D-Bus API Reference

Why Expose a D-Bus Interface?

Exposing control interfaces over D-Bus allows Trance to integrate seamlessly with the rest of the desktop environment. It allows:

The daemon registers the io.github.crateria.trance service on the Session Bus:

Method Signature Security Description
get_status() -> (a{sv}) Unprivileged Returns a map of the current daemon runtime and configurations.
enable() Privileged Enables idle detection triggers. Authenticates sender via control-peer UID.
disable() Privileged Deactivates idle triggers and terminates any active screensavers.
org.freedesktop.ScreenSaver::SetActive(bool active) Privileged Forces screensaver activation. Enforces control-peer UID validations.

Plugin Development

Custom screensavers are compiled as dynamic shared libraries and loaded at runtime. Implement the interface defined in the trance-api crate.

// src/lib.rs
use trance_api::{Plugin, PluginContext, RegisterPlugin};

struct CustomEffect;

impl Plugin for CustomEffect {
    fn render(&mut self, ctx: &mut PluginContext) {
        // Draw directly to the Wayland surface context
    }
}

// Register the entry point hook
trance_api::register_plugin!(CustomEffect);

Morphball Command Line (CUI)

Morphball is designed as a secure, high-performance command-line utility for compression, extraction, and integrity validation on Linux systems.

Command Reference

Command Syntax Description
morphball pack <src> <archive> Compresses files/directories into ZIP, 7z, or tar.gz format.
morphball unpack <archive> [out_dir] Securely extracts archives under the Landlock sandbox layer.
morphball doctor [archive] Runs self-healing diagnostics to repair corrupt sections of an archive.

Morphball Terminal UI

Morphball features an interactive terminal application (TUI) to browse and manage archive operations without manual commands.

Launching the TUI

To start the interactive console explorer, execute:

morphball-tui

TUI Features

Sandboxing Engine

Why Sandboxing is Necessary

Decompression libraries (e.g., zip, 7z, and gzip engines) are historically written in complex C/C++ code, presenting a large attack surface for buffer overflows, directory traversal exploits (e.g., extracting to ../../etc/shadow), and dynamic memory bugs. If a developer or automated daemon decompresses an untrusted archive, the entire host environment could be compromised.

Defense-in-Depth with Landlock LSM

Morphball leverages the Linux Landlock Security Module (LSM) to enforce kernel-level restrictions on the worker thread handling decompression. This guarantees that even if a zero-day vulnerability in the decompression engine is exploited: