mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-15 06:06:07 -06:00
[PR #373] feat: windows service for uac+login support #392
Labels
No labels
Xorg
documentation
enhancement
macos
pull-request
question
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/lan-mouse#392
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/feschber/lan-mouse/pull/373
Author: @jonstelly
Created: 2/4/2026
Status: 🔄 Open
Base:
main← Head:pr/windows-service📝 Commits (10+)
f8b90bffeat: windows service for uac+login support58e04c5watchdog -> winsvc7fec0a4fix winsvc vs win-svc cmd831987cHandle Meta+l to lock screen on windows255aa40minor cleanupbd9f416init_logging commentbc7d28awindows service cleanupfb31483formatting fixes684a829windows clippy fixes9ddc443fix formatting from clippy fixes📊 Changes
12 files changed (+1292 additions, -56 deletions)
View changed files
📝
Cargo.lock(+13 -0)📝
Cargo.toml(+18 -0)📝
input-emulation/Cargo.toml(+4 -0)📝
input-emulation/src/windows.rs(+113 -5)➕
run.ps1(+137 -0)📝
src/config.rs(+44 -3)📝
src/emulation.rs(+5 -1)📝
src/lib.rs(+18 -0)📝
src/main.rs(+122 -46)📝
src/service.rs(+12 -1)➕
src/windows.rs(+236 -0)➕
src/windows_service.rs(+570 -0)📄 Description
Support for installing and running lan-mouse as a windows service. This allows lan-mouse input on UAC elevation prompts and the login/unlock screens.
I'm flipping this PR out of draft mode but I imagine it will need some feedback and comments/direction for things to clean up before it's 100% ready to merge.
General architecture
Running/Testing
1a. build lan-mouse from the jonstelly:pr/windows-service branch
OR
1b. Download build from my fork
2. Copy
./target/debugfiles or extract the release zip file to a directory -c:\ProgramData\lan-mouseis a good option, this is where the config file and certificate will live3. Launch an elevated terminal from the directory
4. Run
lan-mouse installto install and start the windows service - If you already had a lan-mouse config file in your user's local-app-data lan-mouse directory, then the config and certificate will be copied intoc:\ProgramData\lan-mousewith the install command, if not then the service will fail to start, you'll need to create the config.toml file in this directory now and then start the serviceAt this point, lan-mouse should be working in your normal windows desktop session, login screen, unlock screen, or UAC elevation prompts.
Looking for feedback
c:\ProgramData\lan-mousedirectory for storing config and certificate. The install command above will look for a config.toml and lan-mouse.pem file in the user's lan-mouse config directory, if present in user path and not yet in ProgramData, then the install command will copy those files. It's not my favorite pattern, but it seems mostly intuitive, but open for any discussion here🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.