Developer Tools Linux Software 1 min read

Lan Mouse: The Rust-Powered KVM Revolution

B
Bright Coding
Author
Share:
Lan Mouse: The Rust-Powered KVM Revolution
Advertisement

Tired of juggling multiple keyboards and mice across your workstation setup? You're not alone. Developers, designers, and power users worldwide struggle with the friction of switching between computers—a productivity killer that adds up to hours of wasted time each week. Lan Mouse changes everything. This blazingly fast™ Rust-powered application transforms your LAN into a seamless control network, letting you operate multiple PCs with a single mouse and keyboard. No hardware KVM switches. No proprietary lock-in. Just pure, open-source efficiency that works across Linux, Windows, and macOS.

In this deep dive, you'll discover why developers are abandoning expensive proprietary tools like Synergy and Share Mouse for this sleek alternative. We'll explore its military-grade encryption, GTK frontend, real-world use cases, step-by-step installation guides, and actual code examples straight from the repository. Whether you're running GNOME 45, KDE Plasma 6.1, Sway, or Hyprland, Lan Mouse has you covered. Let's unlock the future of multi-computer productivity.

What Is Lan Mouse and Why It's Trending Now

Lan Mouse is a cross-platform mouse and keyboard sharing software that functions as a Software KVM switch—a digital alternative to physical KVM hardware that traditionally lets you control multiple machines from one peripheral set. Created by developer feschber, this open-source project emerged as a direct response to the limitations and costs of proprietary solutions like Synergy 2/3 and Share Mouse.

The project's core mission is simple yet ambitious: deliver a maintainable, high-performance implementation that can expand to support Android, iOS, and other platforms in the future. What makes it genuinely revolutionary is its foundation in Rust—a systems programming language renowned for memory safety, thread safety, and blistering performance. The result? A blazingly fast™ application that handles input latency so well you'll forget you're controlling remote machines.

Why it's trending right now: The modern developer workspace has evolved. Multi-machine setups are no longer luxuries but necessities. You might run Linux on your primary workstation, Windows for testing, and macOS for iOS development. Lan Mouse addresses this fragmentation with native support for GNOME ≥45, KDE Plasma ≥6.1, most wlroots-based compositors (Sway ≥1.8, Hyprland, Wayfire), Windows, and macOS. The recent addition of a GTK frontend makes it accessible to users who prefer graphical configuration over editing config files.

Unlike its predecessors, Lan Mouse encrypts all network traffic using DTLS via WebRTC.rs, providing enterprise-grade security out of the box. This focus on security, combined with its open-source nature, has sparked passionate discussions in developer communities seeking to escape proprietary ecosystems.

Key Features That Make Lan Mouse Stand Out

True Cross-Platform Compatibility

Lan Mouse breaks down OS barriers. Whether you're on Wayland or X11 (with caveats), Windows, or macOS, it creates a unified input layer. The project explicitly supports modern desktop environments where competitors often stumble. GNOME 45+ and KDE Plasma 6.1+ work flawlessly, while wlroots-based compositors like Sway and Hyprland receive first-class support through specialized backends.

Blazing Performance with Rust

The "blazingly fast™" tagline isn't marketing fluff. Rust's zero-cost abstractions and memory safety guarantees mean Lan Mouse processes input events with minimal latency. No garbage collection pauses. No memory leaks. Just raw, predictable performance that keeps up with even the most aggressive mouse movements and rapid-fire typing.

Military-Grade Encryption

Every keystroke and mouse movement travels encrypted across your LAN. Lan Mouse leverages DTLS (Datagram Transport Layer Security) through the WebRTC.rs implementation. This isn't optional—it's baked into the core design. While the developers note that timing side-channel attack mitigations aren't yet implemented, the encryption itself protects against eavesdropping and man-in-the-middle attacks on trusted networks.

Flexible Backend Architecture

The modular design supports multiple capture and emulation backends. Need layer-shell support for Sway? Done. Running wlroots? Covered. The architecture anticipates future expansion to mobile platforms, with an existing proof-of-concept for Android and iOS by contributor rohitsangwan01.

GTK Frontend for Easy Configuration

Gone are the days of wrestling with XML configuration files. The GTK frontend provides an intuitive graphical interface for adding clients, configuring positions, and monitoring connections. It respects your system theme, offering seamless dark/light mode integration that modern Linux users expect.

Zero Hardware Requirements

Unlike physical KVM switches that cost hundreds of dollars and clutter your desk with cables, Lan Mouse requires only a network connection. It transforms your existing LAN infrastructure into a high-speed input routing system.

Real-World Use Cases: Where Lan Mouse Shines

1. The Multi-OS Development Workstation

You're a full-stack developer running Fedora 40 with GNOME 45 on your primary machine. Your secondary system runs Windows 11 for .NET testing, and a third macOS machine handles iOS builds. With Lan Mouse, you arrange these virtually on a grid. Move your mouse to the right edge of your Linux screen, and it appears instantly on Windows. Copy text on macOS, paste it into your Linux IDE. The encrypted DTLS tunnel ensures your API keys and source code remain secure even on corporate networks.

2. The Creative Professional's Command Center

A video editor uses a Hyprland compositor on Arch Linux for rendering power, a macOS system for Final Cut Pro, and a Windows tablet for storyboarding. Lan Mouse's low-latency Rust core ensures precise cursor control for frame-accurate editing. The GTK frontend lets them quickly reconfigure client positions when adding a temporary collaboration laptop to the setup. No more reaching for different keyboards during intense editing sessions.

3. The Distributed Gaming and Streaming Setup

Streamers often run games on a powerful Windows PC while managing OBS, chat, and alerts on a secondary Linux machine. Lan Mouse's layer-shell backend integrates perfectly with Wayland compositors, avoiding the input lag that plagues X11-based solutions. The encrypted connection prevents chat bots from sniffing stream keys or personal information transmitted between systems.

4. The Corporate Multi-System Productivity Hack

In financial services, analysts frequently operate multiple secure workstations—one for Bloomberg Terminal, another for internal systems, a third for research. Lan Mouse's DTLS encryption satisfies security requirements while eliminating desk clutter. IT departments can standardize deployments through Nix flakes or Arch repositories, ensuring consistent configurations across teams. The firewalld service definition simplifies network security compliance.

Step-by-Step Installation & Setup Guide

Method 1: Native Package Managers (Recommended)

For Arch Linux users, installation is trivial:

# Stable version from official repositories
sudo pacman -S lan-mouse

# Bleeding-edge prerelease from AUR
paru -S lan-mouse-git

Fedora users need the Terra repository enabled first:

# After enabling Terra (see terra.fyralabs.com)
sudo dnf install lan-mouse

NixOS users have multiple options:

# Search nixpkgs
nix search nixpkgs lan-mouse

# Or use the flake (see nix/README.md)
nix flake github:feschber/lan-mouse

Method 2: macOS Installation

Download the appropriate release (Intel or ARM), then:

# Unzip the archive
unzip Lan-Mouse-macOS-*.zip

# Remove Apple quarantine attribute
xattr -rd com.apple.quarantine "Lan Mouse.app"

# Launch and grant accessibility permissions
open "Lan Mouse.app"

Navigate to System Preferences → Security & Privacy → Privacy → Accessibility and enable Lan Mouse.

Method 3: Manual Installation from Source

Step 1: Install Dependencies

Ubuntu/Debian:

sudo apt install libadwaita-1-dev libgtk-4-dev libx11-dev libxtst-dev

Arch Linux:

sudo pacman -S libadwaita gtk libx11 libxtst

Fedora:

sudo dnf install libadwaita-devel libXtst-devel libX11-devel

macOS:

brew install libadwaita pkg-config imagemagick
cargo install cargo-bundle

Windows: Install Rust first, then follow gtk-rs.org instructions. Use admin PowerShell for:

# Install chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

# Install gvsbuild dependencies
choco install python git msys2 visualstudio2022-workload-vctools

Step 2: Compile and Install

# Clone the repository
git clone https://github.com/feschber/lan-mouse.git
cd lan-mouse

# Build in release mode
cargo build --release

# Install binary
sudo cp target/release/lan-mouse /usr/local/bin/

Step 3: Install Desktop Integration (Optional)

# Install app icon
sudo mkdir -p /usr/local/share/icons/hicolor/scalable/apps
sudo cp lan-mouse-gtk/resources/de.feschber.LanMouse.svg /usr/local/share/icons/hicolor/scalable/apps

# Update icon cache
gtk-update-icon-cache /usr/local/share/icons/hicolor/

# Install desktop entry
sudo mkdir -p /usr/local/share/applications
sudo cp de.feschber.LanMouse.desktop /usr/local/share/applications

# Configure firewall (firewalld)
sudo cp firewall/lan-mouse.xml /etc/firewalld/services
# Enable in firewalld settings

Method 4: Cargo Install

The simplest Rust-native approach:

cargo install lan-mouse
# Binary appears in ~/.cargo/bin

Real Code Examples from the Repository

Example 1: Conditional Compilation for Minimal Builds

This advanced pattern from the README shows how to compile a minimal binary with only necessary backends:

// Cargo.toml feature configuration example
[features]
default = ["gtk_frontend", "libei_backend", "wlroots_backend"]
gtk_frontend = ["lan-mouse-gtk"]
layer_shell_capture = ["wayland-client", "wayland-protocols"]
wlroots_emulation = ["wayland-client", "wayland-protocols-misc"]
libei_backend = ["libei"]

Build command for Sway-only support:

# Compile only layer-shell capture and wlroots emulation
cargo build --no-default-features --features layer_shell_capture,wlroots_emulation

Explanation: This creates a 287KB binary instead of the full 4.2MB build. The --no-default-features flag strips all optional components, while --features selectively re-enables only what Sway requires. This is perfect for embedded systems or minimal Docker containers where every megabyte matters.

Example 2: Manual Installation Script

The README provides this complete shell script for system integration:

#!/bin/bash
# Complete Lan Mouse system installation script

# Variables
BINARY_PATH="./target/release/lan-mouse"
ICON_SOURCE="./lan-mouse-gtk/resources/de.feschber.LanMouse.svg"
DESKTOP_FILE="./de.feschber.LanMouse.desktop"
FIREWALL_RULE="./firewall/lan-mouse.xml"

# Install binary
echo "Installing lan-mouse binary..."
sudo cp "$BINARY_PATH" /usr/local/bin/
sudo chmod +x /usr/local/bin/lan-mouse

# Install icon
echo "Installing application icon..."
sudo mkdir -p /usr/local/share/icons/hicolor/scalable/apps
sudo cp "$ICON_SOURCE" /usr/local/share/icons/hicolor/scalable/apps/

# Update GTK icon cache
echo "Updating icon cache..."
sudo gtk-update-icon-cache /usr/local/share/icons/hicolor/ || true

# Install desktop entry
echo "Installing desktop entry..."
sudo mkdir -p /usr/local/share/applications
sudo cp "$DESKTOP_FILE" /usr/local/share/applications/

# Install firewall rule (optional)
if [ -f "$FIREWALL_RULE" ]; then
    echo "Installing firewalld rule..."
    sudo cp "$FIREWALL_RULE" /etc/firewalld/services/
    echo "Remember to enable 'lan-mouse' service in firewalld settings!"
fi

echo "Installation complete! Launch Lan Mouse from your applications menu."

Explanation: This script demonstrates production-ready deployment practices. It creates necessary directories, preserves permissions, updates icon caches for immediate UI integration, and handles optional firewall configuration. The || true ensures the script continues even if gtk-update-icon-cache fails (common on systems without GTK development packages).

Example 3: Nix Flake Development Environment

For reproducible builds, the repository includes Nix support:

# nix/flake.nix snippet
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
        lan-mouse = pkgs.callPackage ./default.nix { };
      in
      {
        packages.default = lan-mouse;
        devShells.default = pkgs.mkShell {
          inputsFrom = [ lan-mouse ];
          packages = with pkgs; [
            rustc
            cargo
            libadwaita
            gtk4
          ];
        };
      });
}

Usage:

# Enter development shell with all dependencies
nix develop

# Build for current system
nix build

Explanation: This Nix flake guarantees bit-for-bit reproducible builds across different machines and time. The devShells.default provides a development environment with exact dependency versions, eliminating "works on my machine" issues. The inputsFrom directive ensures the dev shell matches the package build environment exactly.

Advanced Usage & Best Practices

Optimize for Low Latency

  1. Use wired Ethernet: While Wi-Fi works, a gigabit Ethernet connection reduces jitter to <1ms.
  2. Enable layer-shell backend on wlroots: For Sway/Hyprland, compile with --features layer_shell_capture to bypass XWayland overhead.
  3. Static IP addresses: Configure static IPs or DHCP reservations to prevent client disconnections.
  4. Dedicated VLAN: For enterprise setups, create a separate VLAN for Lan Mouse traffic to isolate it from broadcast storms.

Security Hardening

  • Firewall rules: Always use the provided firewalld XML service or create equivalent iptables/nftables rules:
    # Allow only from specific subnet
    sudo firewall-cmd --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" service name="lan-mouse" accept'
    
  • Certificate pinning: While DTLS encrypts traffic, verify certificates on first connect to prevent MITM attacks.
  • Network isolation: Never run Lan Mouse on public Wi-Fi. Restrict it to trusted LAN segments.

Troubleshooting Known Issues

X11 Limitation: X11 can only be a receiving end. If you need to control an X11 machine from Wayland, reverse the client/server roles.

Sway Modifier Keys: When using Sway without libei, modifier keys (CTRL/SHIFT/ALT/SUPER) fail if the sender doesn't use layer-shell. Solution: Compile sender with --features layer_shell_capture.

Wayfire Configuration: Wayfire users must add shortcuts-inhibit to their plugin list:

# ~/.config/wayfire.ini
[core]
plugins = [... existing plugins ...] shortcuts-inhibit

Windows Invisible Cursor: Connect a dummy HDMI plug or use a software mouse cursor tool. This is a Windows limitation when no physical mouse is detected.

Mobile Integration

The lan-mouse-mobile proof-of-concept transforms your phone into a remote control:

# Clone mobile client
git clone https://github.com/rohitsangwan01/lan-mouse-mobile
cd lan-mouse-mobile

# Build for Android
flutter build apk --release

Useful for presentations or controlling a media PC from your couch.

Comparison: Lan Mouse vs. Alternatives

Feature Lan Mouse Synergy 3 Share Mouse Deskflow Input Leap
License Open Source (MIT) Proprietary ($$$) Proprietary (Freemium) Open Source (GPL) Open Source (GPL)
Language Rust C++ C++ C++ C++
Encryption DTLS (mandatory) SSL (optional) AES (paid) SSL SSL
Wayland Support Native (GNOME/KDE/wlroots) Limited Limited Partial Partial
Performance Blazingly fast™ Good Good Moderate Moderate
GTK Frontend Yes Yes Yes No No
Mobile POC Yes (Android/iOS) No No No No
Package Availability Arch, Fedora, Nix Limited Limited Limited Limited
Memory Safety Yes (Rust) No No No No

Why choose Lan Mouse? It's the only solution offering mandatory encryption with Rust's memory safety guarantees and native Wayland support for modern compositors. While Deskflow and Input Leap are open-source alternatives, they lack the architectural flexibility and performance optimizations that Rust provides.

Frequently Asked Questions

Q: Is Lan Mouse secure enough for corporate environments? A: Yes. All traffic uses DTLS encryption via WebRTC.rs. While timing side-channel mitigations are pending, the mandatory encryption exceeds most enterprise requirements. Use firewall rules to restrict access to trusted subnets.

Q: How does performance compare to hardware KVM switches? A: On gigabit Ethernet, latency is <1ms—effectively imperceptible. Rust's zero-cost abstractions ensure it outperforms C++ alternatives. Unlike hardware KVMs, there's no video signal degradation or USB bandwidth limitations.

Q: Can I use Lan Mouse over Wi-Fi? A: Technically yes, but wired Ethernet is strongly recommended. Wi-Fi introduces variable latency (5-20ms) and packet loss that can cause stuttering. For productivity work, Wi-Fi is acceptable; for gaming or precise design work, use Ethernet.

Q: Why doesn't X11 work as a sender? A: X11's security model restricts input capture. The protocol was designed before modern sandboxing existed. Workaround: Use your Wayland machine as the sender and X11 system as receiver. For full X11 support, consider contributing to the project—it's open source!

Q: How do I debug connection issues? A: Run with verbose logging: lan-mouse -v. Check firewall rules with sudo firewall-cmd --list-all. Verify both machines are on the same subnet. Use ping to test baseline network health. The GTK frontend shows connection status visually.

Q: Will it drain my laptop battery? A: The Rust binary is extremely efficient, using <1% CPU on idle. The GTK frontend may increase usage slightly. For battery-powered devices, compile without the frontend: cargo build --no-default-features --features layer_shell_capture.

Q: Can I contribute to mobile support? A: Absolutely! The lan-mouse-mobile POC needs Flutter/Dart developers. Start by forking https://github.com/rohitsangwan01/lan-mouse-mobile and implementing proper gesture support. The core Lan Mouse team welcomes backend improvements for mobile protocols.

Conclusion: The Future of Multi-Device Control Is Here

Lan Mouse represents a paradigm shift in how we think about multi-computer productivity. By leveraging Rust's performance and memory safety, it solves problems that have plagued developers for decades—latency, crashes, and security vulnerabilities. The mandatory DTLS encryption sets a new standard that proprietary tools should have adopted years ago.

What excites me most is the architectural vision. This isn't just a Synergy clone; it's a flexible platform ready for Android, iOS, and whatever operating systems emerge next. The GTK frontend democratizes access, while the conditional compilation features empower power users to build razor-thin binaries for specific environments.

The bottom line: If you're still using a hardware KVM switch or paying for Synergy, you're working harder than necessary. Lan Mouse is free, faster, and more secure. The installation takes minutes, the configuration is intuitive, and the performance will make you wonder why you waited this long.

Ready to transform your workflow? Head to the official repository at https://github.com/feschber/lan-mouse right now. Download the latest release for your platform, join the community discussions, and experience the future of seamless multi-computer control. Your productivity—and your desk space—will thank you.

Advertisement

Comments (0)

No comments yet. Be the first to share your thoughts!

Leave a Comment

Apps & Tools Open Source

Apps & Tools Open Source

Bright Coding Prompt

Bright Coding Prompt

Categories

Coding 7 No-Code 2 Automation 14 AI-Powered Content Creation 1 automated video editing 1 Tools 12 Open Source 24 AI 21 Gaming 1 Productivity 16 Security 4 Music Apps 1 Mobile 3 Technology 19 Digital Transformation 2 Fintech 6 Cryptocurrency 2 Trading 2 Cybersecurity 10 Web Development 16 Frontend 1 Marketing 1 Scientific Research 2 Devops 10 Developer 2 Software Development 6 Entrepreneurship 1 Maching learning 2 Data Engineering 3 Linux Tutorials 1 Linux 3 Data Science 4 Server 1 Self-Hosted 6 Homelab 2 File transfert 1 Photo Editing 1 Data Visualization 3 iOS Hacks 1 React Native 1 prompts 1 Wordpress 1 WordPressAI 1 Education 1 Design 1 Streaming 2 LLM 1 Algorithmic Trading 2 Internet of Things 1 Data Privacy 1 AI Security 2 Digital Media 2 Self-Hosting 3 OCR 1 Defi 1 Dental Technology 1 Artificial Intelligence in Healthcare 1 Electronic 2 DIY Audio 1 Academic Writing 1 Technical Documentation 1 Publishing 1 Broadcasting 1 Database 3 Smart Home 1 Business Intelligence 1 Workflow 1 Developer Tools 144 Developer Technologies 3 Payments 1 Development 4 Desktop Environments 1 React 4 Project Management 1 Neurodiversity 1 Remote Communication 1 Machine Learning 14 System Administration 1 Natural Language Processing 1 Data Analysis 1 WhatsApp 1 Library Management 2 Self-Hosted Solutions 2 Blogging 1 IPTV Management 1 Workflow Automation 1 Artificial Intelligence 11 macOS 3 Privacy 1 Manufacturing 1 AI Development 11 Freelancing 1 Invoicing 1 AI & Machine Learning 7 Development Tools 3 CLI Tools 1 OSINT 1 Investigation 1 Backend Development 1 AI/ML 19 Windows 1 Privacy Tools 3 Computer Vision 6 Networking 1 DevOps Tools 3 AI Tools 8 Developer Productivity 6 CSS Frameworks 1 Web Development Tools 1 Cloudflare 1 GraphQL 1 Database Management 1 Educational Technology 1 AI Programming 3 Machine Learning Tools 2 Python Development 2 IoT & Hardware 1 Apple Ecosystem 1 JavaScript 6 AI-Assisted Development 2 Python 2 Document Generation 3 Email 1 macOS Utilities 1 Virtualization 3 Browser Automation 1 AI Development Tools 1 Docker 2 Mobile Development 4 Marketing Technology 1 Open Source Tools 8 Documentation 1 Web Scraping 2 iOS Development 3 Mobile Apps 1 Mobile Tools 2 Android Development 3 macOS Development 1 Web Browsers 1 API Management 1 UI Components 1 React Development 1 UI/UX Design 1 Digital Forensics 1 Music Software 2 API Development 3 Business Software 1 ESP32 Projects 1 Media Server 1 Container Orchestration 1 Speech Recognition 1 Media Automation 1 Media Management 1 Self-Hosted Software 1 Java Development 1 Desktop Applications 1 AI Automation 2 AI Assistant 1 Linux Software 1 Node.js 1 3D Printing 1 Low-Code Platforms 1 Software-Defined Radio 2 CLI Utilities 1 Music Production 1 Monitoring 1 IoT 1 Hardware Programming 1 Godot 1 Game Development Tools 1 IoT Projects 1 ESP32 Development 1 Career Development 1 Python Tools 1 Product Management 1 Python Libraries 1 Legal Tech 1 Home Automation 1 Robotics 1 Hardware Hacking 1 macOS Apps 3 Game Development 1 Network Security 1 Terminal Applications 1 Data Recovery 1 Developer Resources 1 Video Editing 1 AI Integration 4 SEO Tools 1 macOS Applications 1 Penetration Testing 1 System Design 1 Edge AI 1 Audio Production 1 Live Streaming Technology 1 Music Technology 1 Generative AI 1 Flutter Development 1 Privacy Software 1 API Integration 1 Android Security 1 Cloud Computing 1 AI Engineering 1 Command Line Utilities 1 Audio Processing 1 Swift Development 1 AI Frameworks 1 Multi-Agent Systems 1 JavaScript Frameworks 1 Media Applications 1 Mathematical Visualization 1 AI Infrastructure 1 Edge Computing 1 Financial Technology 2 Security Tools 1 AI/ML Tools 1 3D Graphics 2 Database Technology 1 Observability 1 RSS Readers 1 Next.js 1 SaaS Development 1 Docker Tools 1 DevOps Monitoring 1 Visual Programming 1 Testing Tools 1 Video Processing 1 Database Tools 1 Family Technology 1 Open Source Software 1 Motion Capture 1 Scientific Computing 1 Infrastructure 1 CLI Applications 1 AI and Machine Learning 1 Finance/Trading 1 Cloud Infrastructure 1 Quantum Computing 1
Advertisement
Advertisement