{"id":13456955,"url":"https://github.com/feschber/lan-mouse","last_synced_at":"2026-02-06T16:13:25.375Z","repository":{"id":65922309,"uuid":"536802516","full_name":"feschber/lan-mouse","owner":"feschber","description":"mouse \u0026 keyboard sharing via LAN","archived":false,"fork":false,"pushed_at":"2025-12-04T12:00:21.000Z","size":1478,"stargazers_count":4164,"open_issues_count":95,"forks_count":156,"subscribers_count":31,"default_branch":"main","last_synced_at":"2025-12-11T19:41:12.776Z","etag":null,"topics":["gplv3","gtk4-rs","hyprland","keyboard-emulation","kvm-switch","lan","libadwaita","linux","macos","mouse-emulation","open-source","rust","tcp","udp","wayland","wayland-client","windows","wlroots"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feschber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["feschber"],"ko_fi":"feschber"}},"created_at":"2022-09-15T00:15:20.000Z","updated_at":"2025-12-11T03:13:16.000Z","dependencies_parsed_at":"2023-10-10T22:16:09.370Z","dependency_job_id":"2e8866a7-35b4-4090-81c1-ec817bd86638","html_url":"https://github.com/feschber/lan-mouse","commit_stats":null,"previous_names":["feschber/lan-mouse","ferdinandschober/lan-mouse"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/feschber/lan-mouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feschber%2Flan-mouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feschber%2Flan-mouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feschber%2Flan-mouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feschber%2Flan-mouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feschber","download_url":"https://codeload.github.com/feschber/lan-mouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feschber%2Flan-mouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29167886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T15:38:29.831Z","status":"ssl_error","status_checked_at":"2026-02-06T15:37:48.592Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gplv3","gtk4-rs","hyprland","keyboard-emulation","kvm-switch","lan","libadwaita","linux","macos","mouse-emulation","open-source","rust","tcp","udp","wayland","wayland-client","windows","wlroots"],"created_at":"2024-07-31T08:01:30.791Z","updated_at":"2026-02-06T16:13:25.368Z","avatar_url":"https://github.com/feschber.png","language":"Rust","readme":"# Lan Mouse\nLan Mouse is a *cross-platform* mouse and keyboard sharing software similar to universal-control on Apple devices.\nIt allows for using multiple PCs via a single set of mouse and keyboard.\nThis is also known as a Software KVM switch.\n\nGoal of this project is to be an open-source alternative to proprietary tools like [Synergy 2/3](https://symless.com/synergy), [Share Mouse](https://www.sharemouse.com/de/)\nand other open source tools like [Deskflow](https://github.com/deskflow/deskflow) or [Input Leap](https://github.com/input-leap) (Synergy fork).\n\nFocus lies on performance, ease of use and a maintainable implementation that can be expanded to support additional backends for e.g. Android, iOS, ... in the future.\n\n***blazingly fast™*** because it's written in rust.\n\n- _Now with a gtk frontend_\n\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"/screenshots/dark.png?raw=true\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"/screenshots/light.png?raw=true\"\u003e\n    \u003cimg alt=\"Screenshot of Lan-Mouse\" srcset=\"/screenshots/dark.png\"\u003e\n\u003c/picture\u003e\n\n\n## Encryption\n\nLan Mouse encrypts all network traffic using the DTLS implementation provided by [WebRTC.rs](https://github.com/webrtc-rs/webrtc).\nThere are currently no mitigations in place for timing side-channel attacks.\n\n## OS Support\n\nMost current desktop environments and operating systems are fully supported, this includes\n- GNOME \u003e= 45\n- KDE Plasma \u003e= 6.1\n- Most wlroots based compositors, including Sway (\u003e= 1.8), Hyprland and Wayfire\n- Windows\n- MacOS\n\n\n### Caveats / Known Issues\n\n\u003e [!Important]\n\u003e - **X11** currently only has support for input emulation, i.e. can only be used on the receiving end.\n\u003e\n\u003e - **Sway / wlroots**: Wlroots based compositors without libei support on the receiving end currently do not handle modifier events on the client side.\n\u003e This results in CTRL / SHIFT / ALT / SUPER keys not working with a sending device that is NOT using the `layer-shell` backend\n\u003e\n\u003e - **Wayfire**: If you are using [Wayfire](https://github.com/WayfireWM/wayfire), make sure to use a recent version (must be newer than October 23rd) and **add `shortcuts-inhibit` to the list of plugins in your wayfire config!**\n\u003e Otherwise input capture will not work.\n\u003e\n\u003e - **Windows**: The mouse cursor will be invisible when sending input to a Windows system if\n\u003e there is no real mouse connected to the machine.\n\nFor more detailed information about os support see [Detailed OS Support](#detailed-os-support)\n\n### Android \u0026 IOS\n\nA proof of concept for an Android / IOS Application by [rohitsangwan01](https://github.com/rohitsangwan01) can be found [here](https://github.com/rohitsangwan01/lan-mouse-mobile).\nIt can be used as a remote control for any device supported by Lan Mouse.\n\n## Installation\n\n\u003cdetails\u003e\n    \u003csummary\u003eArch Linux\u003c/summary\u003e\n\nLan Mouse can be installed from the [official repositories](https://archlinux.org/packages/extra/x86_64/lan-mouse/):\n\n```sh\npacman -S lan-mouse\n```\n\nThe prerelease version (following `main`) is available on the AUR:\n\n```sh\nparu -S lan-mouse-git\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003eNix (OS)\u003c/summary\u003e\n\n- nixpkgs: [search.nixos.org](https://search.nixos.org/packages?channel=unstable\u0026show=lan-mouse\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=lan-mouse)\n- flake: [README.md](./nix/README.md)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eFedora\u003c/summary\u003e\nYou can install Lan Mouse from the [Terra Repository](https://terra.fyralabs.com).\n\n\nAfter enabling Terra:\n\n```sh\ndnf install lan-mouse\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eMacOS\u003c/summary\u003e\n\n- Download the package for your Mac (Intel or ARM) from the releases page\n- Unzip it\n- Remove the quarantine with `xattr -rd com.apple.quarantine \"Lan Mouse.app\"`\n- Launch the app\n- Grant accessibility permissions in System Preferences\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003eManual Installation\u003c/summary\u003e\n\nFirst make sure to [install the necessary dependencies](#installing-dependencies-for-development--compiling-from-source).\n\nPrecompiled release binaries for Windows, MacOS and Linux are available in the [releases section](https://github.com/feschber/lan-mouse/releases).\nFor Windows, the depenedencies are included in the .zip file, for other operating systems see [Installing Dependencies](#installing-dependencies-for-development--compiling-from-source).\n\nAlternatively, the `lan-mouse` binary can be compiled from source (see below).\n\n### Installing desktop file, app icon and firewall rules (optional)\n```sh\n# install lan-mouse (replace path/to/ with the correct path)\nsudo cp path/to/lan-mouse /usr/local/bin/\n\n# install app icon\nsudo mkdir -p /usr/local/share/icons/hicolor/scalable/apps\nsudo cp lan-mouse-gtk/resources/de.feschber.LanMouse.svg /usr/local/share/icons/hicolor/scalable/apps\n\n# update icon cache\ngtk-update-icon-cache /usr/local/share/icons/hicolor/\n\n# install desktop entry\nsudo mkdir -p /usr/local/share/applications\nsudo cp de.feschber.LanMouse.desktop /usr/local/share/applications\n\n# when using firewalld: install firewall rule\nsudo cp firewall/lan-mouse.xml /etc/firewalld/services\n# -\u003e enable the service in firewalld settings\n```\n\nInstead of downloading from the releases, the `lan-mouse` binary\ncan be easily compiled via cargo or nix:\n\n### Compiling and installing manually:\n```sh\n# compile in release mode\ncargo build --release\n\n# install lan-mouse\nsudo cp target/release/lan-mouse /usr/local/bin/\n```\n\n### Compiling and installing via cargo:\n```sh\n# will end up in ~/.cargo/bin\ncargo install lan-mouse\n```\n\n### Compiling and installing via nix:\n```sh\n# you can find the executable in result/bin/lan-mouse\nnix-build\n```\n### Conditional compilation\nSupport for other platforms is omitted automatically based on the active\nrust toolchain.\n\nAdditionally, available backends and frontends can be configured manually via\n[cargo features](https://doc.rust-lang.org/cargo/reference/features.html).\n\nE.g. if only support for sway is needed, the following command produces\nan executable with support for only the `layer-shell` capture backend\nand `wlroots` emulation backend:\n```sh\ncargo build --no-default-features --features layer_shell_capture,wlroots_emulation\n```\nFor a detailed list of available features, checkout the [Cargo.toml](./Cargo.toml)\n\u003c/details\u003e\n\n\n\n\n## Installing Dependencies for Development / Compiling from Source\n\u003cdetails\u003e\n    \u003csummary\u003eMacOS\u003c/summary\u003e\n\n```sh\n# Install dependencies\nbrew install libadwaita pkg-config imagemagick\ncargo install cargo-bundle\n# Create the macOS icon file\nscripts/makeicns.sh\n# Create the .app bundle\ncargo bundle\n# Copy all dynamic libraries into the bundle, and update the bundle to find them there\nscripts/copy-macos-dylib.sh\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eUbuntu and derivatives\u003c/summary\u003e\n\n```sh\nsudo apt install libadwaita-1-dev libgtk-4-dev libx11-dev libxtst-dev\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eArch and derivatives\u003c/summary\u003e\n\n```sh\nsudo pacman -S libadwaita gtk libx11 libxtst\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eFedora and derivatives\u003c/summary\u003e\n\n```sh\nsudo dnf install libadwaita-devel libXtst-devel libX11-devel\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n    \u003csummary\u003eNix\u003c/summary\u003e\n\n```sh\nnix-shell .\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n    \u003csummary\u003eNix (flake)\u003c/summary\u003e\n\n```sh\nnix develop\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eWindows\u003c/summary\u003e\n\n- First install [Rust](https://www.rust-lang.org/tools/install).\n\n- Then follow the instructions at [gtk-rs.org](https://gtk-rs.org/gtk4-rs/stable/latest/book/installation_windows.html)\n\n*TLDR:*\n\nBuild gtk from source\n\n- The following commands should be run in an **admin power shell** instance:\n```sh\n# install chocolatey\nSet-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\n\n# install gvsbuild dependencies\nchoco install python git msys2 visualstudio2022-workload-vctools\n```\n\n- The following commands should be run in a **regular power shell** instance:\n\n```sh\n# install gvsbuild with python\npython -m pip install --user pipx\npython -m pipx ensurepath\n```\n\n- Relaunch your powershell instance so the changes in the environment are reflected.\n```sh\npipx install gvsbuild\n\n# build gtk + libadwaita\ngvsbuild build gtk4 libadwaita librsvg adwaita-icon-theme\n```\n\n- **Make sure to add the directory** `C:\\gtk-build\\gtk\\x64\\release\\bin`\n[**to the `PATH` environment variable**]((https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14))). Otherwise the project will fail to build.\n\nTo avoid building GTK from source, it is possible to disable\nthe gtk frontend (see conditional compilation).\n\u003c/details\u003e\n\n## Usage\n\u003cdetails\u003e\n    \u003csummary\u003eGtk Frontend\u003c/summary\u003e\n\nBy default the gtk frontend will open when running `lan-mouse`.\n\nTo connect a device you want to control, simply click the `Add` button and enter the hostname\nof the device.\n\nOn the *remote* device, authorize your *local* device for incoming traffic using the `Authorize` button\nunder the \"Incoming Connections\" section.\nThe fingerprint for authorization can be found under the general section of your *local* device.\nIt is of the form \"aa:bb:cc:...\"\n\nAuthorized devices can be persisted using the configuration file (see [Configuration](#configuration)).\n\nIf the device still can not be entered, make sure you have UDP port `4242` (or the one selected) opened up in your firewall.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eCommand Line Interface\u003c/summary\u003e\n\nThe cli interface can be accessed by passing `cli` as a commandline argument.\nUse\n```sh\nlan-mouse cli help\n```\n to list the available commands and\n```sh\nlan-mouse cli \u003ccmd\u003e help\n```\nfor information on how to use a specific command.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003eDaemon Mode\u003c/summary\u003e\n\nLan Mouse can be launched in daemon mode to keep it running in the background (e.g. for use in a systemd-service).\n\nTo do so, use the `daemon` subcommand:\n\n```sh\nlan-mouse daemon\n```\n\nIn order to start lan-mouse with a graphical session automatically,\nthe [systemd-service](service/lan-mouse.service) can be used:\n\nCopy the file to `~/.config/systemd/user/` and enable the service:\n\n```sh\ncp service/lan-mouse.service ~/.config/systemd/user\nsystemctl --user daemon-reload\nsystemctl --user enable --now lan-mouse.service\n```\n\u003c/details\u003e\n\n## Configuration\nTo automatically load clients on startup, the file `$XDG_CONFIG_HOME/lan-mouse/config.toml` is parsed.\n`$XDG_CONFIG_HOME` defaults to `~/.config/`.\n\nTo create this file you can copy the following example config:\n\n### Example config\n\u003e [!TIP]\n\u003e key symbols in the release bind are named according\n\u003e to their names in [input-event/src/scancode.rs#L172](input-event/src/scancode.rs#L176).\n\u003e This is bound to change\n\n```toml\n# example configuration\n\n# configure release bind\nrelease_bind = [ \"KeyA\", \"KeyS\", \"KeyD\", \"KeyF\" ]\n\n# optional port (defaults to 4242)\nport = 4242\n\n# list of authorized tls certificate fingerprints that\n# are accepted for incoming traffic\n[authorized_fingerprints]\n\"bc:05:ab:7a:a4:de:88:8c:2f:92:ac:bc:b8:49:b8:24:0d:44:b3:e6:a4:ef:d7:0b:6c:69:6d:77:53:0b:14:80\" = \"iridium\"\n\n# define a client on the right side with host name \"iridium\"\n[[clients]]\n# position (left | right | top | bottom)\nposition = \"right\"\n# hostname\nhostname = \"iridium\"\n# activate this client immediately when lan-mouse is started\nactivate_on_startup = true\n# optional list of (known) ip addresses\nips = [\"192.168.178.156\"]\n\n# define a client on the left side with IP address 192.168.178.189\n[[clients]]\nposition = \"left\"\n# The hostname is optional: When no hostname is specified,\n# at least one ip address needs to be specified.\nhostname = \"thorium\"\n# ips for ethernet and wifi\nips = [\"192.168.178.189\", \"192.168.178.172\"]\n# optional port\nport = 4242\n```\n\nWhere `left` can be either `left`, `right`, `top` or `bottom`.\n\n## Roadmap\n- [x] Graphical frontend (gtk + libadwaita)\n- [x] respect xdg-config-home for config file location.\n- [x] IP Address switching\n- [x] Liveness tracking Automatically ungrab mouse when client unreachable\n- [x] Liveness tracking: Automatically release keys, when server offline\n- [x] MacOS KeyCode Translation\n- [x] Libei Input Capture\n- [x] MacOS Input Capture\n- [x] Windows Input Capture\n- [x] Encryption\n- [ ] X11 Input Capture\n- [ ] Latency measurement and visualization\n- [ ] Bandwidth usage measurement and visualization\n- [ ] Clipboard support\n\n\n## Detailed OS Support\n\nIn order to use a device for sending events, an **input-capture** backend is required, while receiving events requires\na supported **input-emulation** *and* **input-capture** backend.\n\nA suitable backend is chosen automatically based on the active desktop environment / compositor.\n\nThe following sections detail the emulation and capture backends provided by lan-mouse and their support in desktop environments / operating systems.\n\n### Input Emulation Support\n\n| Desktop / Backend         | wlroots                  | libei                    | remote-desktop portal    | windows                  |   macos                                | x11                |\n|---------------------------|--------------------------|--------------------------|--------------------------|--------------------------|----------------------------------------|--------------------|\n| Wayland (wlroots)         | :heavy_check_mark:       |                          |                          |                          |                                        |                    |\n| Wayland (KDE)             |                          | :heavy_check_mark:       | :heavy_check_mark:       |                          |                                        |                    |\n| Wayland (Gnome)           |                          | :heavy_check_mark:       | :heavy_check_mark:       |                          |                                        |                    |\n| Windows                   |                          |                          |                          | :heavy_check_mark:       |                                        |                    |\n| MacOS                     |                          |                          |                          |                          |   :heavy_check_mark:                   |                    |\n| X11                       |                          |                          |                          |                          |                                        | :heavy_check_mark: |\n\n- `wlroots`: This backend makes use of the [wlr-virtual-pointer-unstable-v1](https://wayland.app/protocols/wlr-virtual-pointer-unstable-v1) and [virtual-keyboard-unstable-v1](https://wayland.app/protocols/virtual-keyboard-unstable-v1) protocols and is supported by most wlroots based compositors.\n- `libei`: This backend uses [libei](https://gitlab.freedesktop.org/libinput/libei) and is supported by GNOME \u003e= 45 or KDE Plasma \u003e= 6.1.\n- `xdp`: This backend uses the [freedesktop remote-desktop-portal](https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.RemoteDesktop) and is supported on GNOME and Plasma.\n- `x11`: Backend for X11 sessions.\n- `windows`: Backend for Windows.\n- `macos`: Backend for MacOS.\n\n\n\n### Input Capture Support\n\n| Desktop / Backend         | layer-shell              | libei                    | windows                  |   macos                                | x11 |\n|---------------------------|--------------------------|--------------------------|--------------------------|----------------------------------------|-----|\n| Wayland (wlroots)         | :heavy_check_mark:       |                          |                          |                                        |     |\n| Wayland (KDE)             | :heavy_check_mark:       | :heavy_check_mark:       |                          |                                        |     |\n| Wayland (Gnome)           |                          | :heavy_check_mark:       |                          |                                        |     |\n| Windows                   |                          |                          | :heavy_check_mark:       |                                        |     |\n| MacOS                     |                          |                          |                          |   :heavy_check_mark:                   |     |\n| X11                       |                          |                          |                          |                                        | WIP |\n\n- `layer-shell`: This backend creates a single pixel wide window on the edges of Displays to capture the cursor using the [layer-shell protocol](https://wayland.app/protocols/wlr-layer-shell-unstable-v1).\n- `libei`: This backend uses [libei](https://gitlab.freedesktop.org/libinput/libei) and is supported by GNOME \u003e= 45 or KDE Plasma \u003e= 6.1.\n- `windows`: Backend for input capture on Windows.\n- `macos`: Backend for input capture on MacOS.\n- `x11`: TODO (not yet supported)\n","funding_links":["https://github.com/sponsors/feschber","https://ko-fi.com/feschber"],"categories":["Rust","Productivity Tools","HarmonyOS","Applications","System Management"],"sub_categories":["Media Servers","Windows Manager","Utilities","System Configuration"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeschber%2Flan-mouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeschber%2Flan-mouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeschber%2Flan-mouse/lists"}