PlasmaLLM Desktop Driver is a secure, general-purpose daemon that enables autonomous AI agents (such as LLMs) to interact with the Linux desktop environment under Wayland and KDE Plasma 6. While designed primarily as the companion driver for the plasmallm KDE Plasma 6 widget, it is built on a standard D-Bus interface and can be utilized by other local automation tools or agentic applications (see the Developer Guide for API details).
By leveraging the Freedesktop Remote Desktop portal for input injection and GStreamer/PipeWire for visual captures, the driver facilitates secure input emulation and visual feedback (screenshots, grids, cell crops), all while giving the user absolute authority and visibility.
An explicit user approval is required only during the initial connection handshake (e.g. the first time an application interacts with the driver), allowing subsequent conversations and actions to reuse the active session without prompting again. All operations return visual confirmation images for instant verification.
-
Wayland-Native Input Injection: Emulates keyboard, mouse, and touch inputs using the Freedesktop Remote Desktop portal.
-
GStreamer/PipeWire Vision Pipeline: Delivers low-latency screen captures directly from the compositor, processed fully in-memory.
-
D-Bus Handshake & Consent Protocol: Prompts the user for approval via a GUI dialog only during the initial handshake, authorizing the client process for the duration of the system session.
-
System Tray Indicator: A system tray icon with a status indicator and disconnect options, giving you ultimate control over the active session.
-
Compound Macros: Supports complex operations like single-step click-and-type to minimize tool call latency.
- KDE Plasma 6.0+ (Wayland)
- Python 3.8+
- GStreamer & PipeWire (for screen capture)
Download the latest .deb or .rpm package from the Releases page.
Debian/Ubuntu:
sudo apt install ./plasmallm-desktop-driver_*.debFedora/RHEL:
sudo dnf install ./plasmallm-desktop-driver-*.rpmAfter installing, enable and start the user-level systemd service:
systemctl --user enable --now plasmallm-desktop-driver.serviceIf you prefer to run the script directly:
-
Install the required system dependencies:
- Fedora/RHEL:
sudo dnf install gstreamer1 gstreamer1-plugins-base pipewire-gstreamer python3-dbus python3-gobject python3-pyside6 python3-pillow
- Ubuntu/Debian:
sudo apt install gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-pipewire python3-dbus python3-gi python3-pyside6 python3-pillow
- Fedora/RHEL:
-
Alternatively, install Python packages via pip:
pip install -r requirements.txt
-
Run the driver:
python3 plasmallm-desktop-driver.py
To install a user-local systemd service pointing to the source directory:
make install-user
systemctl --user enable --now plasmallm-desktop-driver.serviceTo install system-wide to /opt/plasmallm-desktop-driver:
sudo make install
systemctl --user enable --now plasmallm-desktop-driver.serviceYou can test the daemon's input emulation, portal negotiation, consent dialog, and screenshot functions using the built-in diagnostic applet:
python3 plasmallm-test-applet.py
- Developer Guide: D-Bus method definitions, path conventions, and complete JSON-RPC command/response specifications.
- LLM User Guide: Screen navigation best practices, range crops (e.g.,
A6-C6), and normalized coordinate workflows designed for LLM prompts.
If you find this driver useful, please consider supporting the KDE Project.
This project is licensed under the GNU General Public License v2.0 or later.
This project was created with extensive use of AI-based tooling.