Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work when being run as a Windows service. #207

Open
20excal07 opened this issue Sep 29, 2024 · 1 comment
Open

Doesn't seem to work when being run as a Windows service. #207

20excal07 opened this issue Sep 29, 2024 · 1 comment

Comments

@20excal07
Copy link

20excal07 commented Sep 29, 2024

I'd like to set this up as a Windows service via srvany-ng, but it seems like the app isn't doing anything once the service is started. I can see the lan-mouse.exe process in Task Manager, but that's about it.

The command I want to run is as follows:
C:\lan-mouse-windows\lan-mouse.exe -d -c C:\lan-mouse-windows\config.toml

And following the steps through srvany-ng, these are the registry keys inside HKLM\SYSTEM\CurrentControlSet\Services\Lan-Mouse\Parameters:

Name Type Data
Application REG_SZ (String) C:\lan-mouse-windows\lan-mouse.exe
AppDirectory REG_SZ (String) C:\lan-mouse-windows\
AppParameters REG_SZ (String) -d -c C:\lan-mouse-windows\config.toml

And here are the contents of config.toml:

# configure release bind
release_bind = [ "KeyJ", "KeyK", "KeyL", "KeySemicolon" ]

# optional port (defaults to 4242)
port = 4242
# optional frontend -> defaults to gtk if available
# possible values are "cli" and "gtk" 
frontend = "Cli"

[top]
# hostname
hostname = "192.168.18.235"
# activate this client immediately when lan-mouse is started
activate_on_startup = true

And yes, I've tested running the command as-is through the CLI, it works just fine when it's run that way.

EDIT: I managed to run the app via a batch file, but still launched through the srvany-ng service, so I could get the log output, but there doesn't seem to be anything to indicate that there was an issue. Very strange...

[2024-09-29T07:40:37Z INFO  lan_mouse::config] using config: "C:\lan-mouse-windows\config.toml"
[2024-09-29T07:40:37Z INFO  lan_mouse] release bind: [KeyJ, KeyK, KeyL, KeySemicolon]
[2024-09-29T07:40:37Z INFO  lan_mouse] Press [KeyJ, KeyK, KeyL, KeySemicolon] to release the mouse
[2024-09-29T07:40:37Z INFO  lan_mouse::server] running service
[2024-09-29T07:40:37Z INFO  input_capture] using capture backend: windows
[2024-09-29T07:40:37Z INFO  lan_mouse::server::capture_task] [(0, (ClientConfig { hostname: Some("192.168.18.235"), fix_ips: [], port: 4242, pos: Top, cmd: None }, ClientState { active: true, active_addr: None, alive: false, dns_ips: [], ips: {}, pressed_keys: {}, resolving: false }))]
[2024-09-29T07:40:37Z INFO  lan_mouse::server::emulation_task] creating input emulation...
[2024-09-29T07:40:37Z INFO  input_emulation] using emulation backend: windows
[2024-09-29T07:40:37Z INFO  lan_mouse::dns] resolving (0) `192.168.18.235` ...
[2024-09-29T07:40:37Z INFO  lan_mouse::dns] 192.168.18.235: adding ip 192.168.18.235

(should probably clarify that by "not working", i mean that it doesn't swap control to the other host after moving the cursor to the edge of the screen)

@feschber
Copy link
Owner

feschber commented Oct 1, 2024

I tried that and did not get it to work either (the service seems to be running but it wont allow input capturing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants