feschber / lan-mouse

mouse & keyboard sharing via LAN
GNU General Public License v3.0
2.59k stars 81 forks source link

Failed to load shader program: Compilation failure in shader. #223

Open alazyworkaholic opened 1 week ago

alazyworkaholic commented 1 week ago

I have a windows laptop and Linux (nixos) desktop. I want to use the laptop's keyboard & mouse (and/or trackpad) as if it were the desktop's.

I downloaded and extracted lan-mouse-windows.zip release v0.9.1. I then copy-pasted the config.toml and adjusted to set the ip address for the other machine on my network (and deleted the [Left] section). I also had to change "gtk" to "Gtk". I then ran C:\Users\alazy\Downloads\lan-mouse-windows\lan-mouse.exe

I got this:

[2024-1[1-05T06:56:15Z INFO  lan_mouse::config] using config: "C:\Users\alazy\AppData\Local\lan-mouse\config.toml"
[2024-11-05T06:56:15Z INFO  lan_mouse] release bind: [KeyA, KeyS, KeyD, KeyF]
[2024-11-05T06:56:15Z INFO  lan_mouse::config] using config: "C:\Users\alazy\AppData\Local\lan-mouse\config.toml"

(lan-mouse.exe:768): GLib-G[2024-11-05T06:56:15Z INFO  lan_mouse] release bind: [KeyA, KeyS, KeyD, KeyF]
IO-WARNIN[2024-11-05T06:56:15Z INFO  lan_mouse] Press [KeyA, KeyS, KeyD, KeyF] to release the mouse
G **: 01:56:15.598: win32 session dbus binary not found
[2024-11-05T06:56:15Z INFO  lan_mouse::server] running service
[2024-11-05T06:56:15Z INFO  input_capture] using capture backend: windows
[2024-11-05T06:56:15Z INFO  lan_mouse::server::capture_task] [(0, (ClientConfig { hostname: Some("DX58SO"), fix_ips: [10.90.90.89], port: 4242, pos: Right, cmd: None }, ClientState { active: true, active_addr: None, alive: false, dns_ips: [], ips: {10.90.90.89}, pressed_keys: {}, resolving: false }))]
[2024-11-05T06:56:15Z INFO  lan_mouse::server::emulation_task] creating input emulation...
[2024-11-05T06:56:15Z INFO  input_emulation] using emulation backend: windows
[2024-11-05T06:56:15Z INFO  lan_mouse::dns] resolving (0) `DX58SO` ...

(lan-mouse.exe:768): Gsk-CRITICAL **: 01:56:17.490: Failed to load shader program: Compilation failure in shader.
Source Code:

Then many lines of source code scroll incessantly.

What am I doing wrong? config.toml.txt

alazyworkaholic commented 1 week ago

Following up, lan-mouse starts if I write "Cli" in config.toml instead of "Gtk". I install and run lan-mouse on nixos. (renamed nixos from DX58SO in last post) However, on the Windows sender, I just get:

[2024-11-05T07:39:27Z INFO  lan_mouse::config] using config: "C:\Users\alazy\AppData\Local\lan-mouse\config.toml"
[2024-11-05T07:39:27Z INFO  lan_mouse] release bind: [KeyA, KeyS, KeyD, KeyF]
[2024-11-05T07:39:27Z INFO  lan_mouse::config] using config: "C:\Users\alazy\AppData\Local\lan-mouse\config.toml"
[2024-11-05T07:39:27Z INFO  lan_mouse] release bind: [KeyA, KeyS, KeyD, KeyF]
[2024-11-05T07:39:27Z INFO  lan_mouse] Press [KeyA, KeyS, KeyD, KeyF] to release the mouse
[2024-11-05T07:39:27Z INFO  lan_mouse::server] running service
[2024-11-05T07:39:27Z INFO  input_capture] using capture backend: windows
[2024-11-05T07:39:27Z INFO  lan_mouse::server::capture_task] [(0, (ClientConfig { hostname: Some("nixos"), fix_ips: [10.90.90.89], port: 4242, pos: Right, cmd: None }, ClientState { active: true, active_addr: None, alive: false, dns_ips: [], ips: {10.90.90.89}, pressed_keys: {}, resolving: false }))]
[2024-11-05T07:39:27Z INFO  lan_mouse::server::emulation_task] creating input emulation...
[2024-11-05T07:39:27Z INFO  input_emulation] using emulation backend: windows
[2024-11-05T07:39:27Z INFO  lan_mouse::dns] resolving (0) `nixos` ...
[2024-11-05T07:39:27Z INFO  lan_mouse::dns] nixos: adding ip 192.168.43.152
lan-mouse > emulation status: Enabled
lan-mouse > capture status: Enabled
lan-mouse > changed port to 4242
lan-mouse > client 0: nixos:4242 (right), ips: [10.90.90.89] active: true, dns: {192.168.43.152, 10.90.90.89}
lan-mouse > [2024-11-05T07:39:31Z WARN  lan_mouse::server::ping_task] client not responding, releasing pointer!
[2024-11-05T07:39:34Z WARN  lan_mouse::server::ping_task] client not responding, releasing pointer!
0[2024-11-05T07:42:04Z WARN  lan_mouse::server::ping_task] client not responding, releasing pointer!

It releases the pointer every time I move it past the right side of the screen.

Whereas on the Linux receiver, I see:

[root@nixos:/etc/nixos]# lan-mouse 
[2024-11-05T08:04:29Z WARN  lan_mouse::config] /root/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2024-11-05T08:04:29Z WARN  lan_mouse::config] Continuing without config file ...
[2024-11-05T08:04:29Z INFO  lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt]
[2024-11-05T08:04:29Z WARN  lan_mouse::config] /root/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2024-11-05T08:04:29Z WARN  lan_mouse::config] Continuing without config file ...
[2024-11-05T08:04:29Z INFO  lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt]
[2024-11-05T08:04:29Z INFO  lan_mouse] Press Ctrl+Alt+Shift+Super to release the mouse
[2024-11-05T08:04:29Z INFO  lan_mouse::server] running service
[2024-11-05T08:04:29Z INFO  lan_mouse::emulate] wayland backend not available: the requested global was not found in the registry
[2024-11-05T08:04:29Z INFO  lan_mouse::capture] libei input capture not available: ZBus Error: I/O error: Broken pipe (os error 32)
[2024-11-05T08:04:29Z INFO  lan_mouse::capture] layer_shell input capture not available: zwlr_layer_shell_v1 >= v3 not supported - required to display a surface at the edge of the screen
[2024-11-05T08:04:29Z INFO  lan_mouse::capture] x11 input capture not available: not implemented
[2024-11-05T08:04:29Z ERROR lan_mouse::capture] falling back to dummy input capture
[2024-11-05T08:04:29Z INFO  lan_mouse::emulate] libei not available: ZBus Error: I/O error: Broken pipe (os error 32)
[2024-11-05T08:04:29Z INFO  lan_mouse::emulate] remote desktop portal not available: ZBus Error: I/O error: Broken pipe (os error 32)
[2024-11-05T08:04:29Z INFO  lan_mouse::emulate] using x11 input emulation

(lan-mouse:354906): Gtk-WARNING **: 03:04:29.826: Unable to acquire session bus: The connection is closed

(lan-mouse:354906): Gtk-WARNING **: 03:04:30.001: Allocating size to LanMouseWindow 0x5571d8c23d20 without calling gtk_widget_measure(). How does the code know the size to allocate?
[2024-11-05T08:04:34Z WARN  lan_mouse::server::emulation_task] ignoring events from client 10.90.90.88:4242
[2024-11-05T08:04:34Z WARN  lan_mouse::server::emulation_task] ignoring events from client 192.168.43.21:4242
[2024-11-05T08:04:35Z WARN  lan_mouse::server::emulation_task] ignoring events from client 10.90.90.88:4242
[2024-11-05T08:04:35Z WARN  lan_mouse::server::emulation_task] ignoring events from client 192.168.43.21:4242
[2024-11-05T08:04:36Z WARN  lan_mouse::server::emulation_task] ignoring events from client 10.90.90.88:4242
[2024-11-05T08:04:36Z WARN  lan_mouse::server::emulation_task] ignoring events from client 192.168.43.21:4242
[2024-11-05T08:04:37Z WARN  lan_mouse::server::emulation_task] ignoring events from client 10.90.90.88:4242
[2024-11-05T08:04:37Z WARN  lan_mouse::server::emulation_task] ignoring events from client 192.168.43.21:4242
[2024-11-05T08:04:44Z INFO  lan_mouse::frontend::gtk] frontend exited successfully
[2024-11-05T08:04:44Z INFO  lan_mouse::server] terminating service
[2024-11-05T08:04:44Z INFO  lan_mouse::server::frontend_task] terminating gracefully...

I see there seems to be a connection through both wifi 192 and ethernet 10. so my routing needs a fix, but I don't think that's the problem.

What next?

feschber commented 1 week ago

You currently have to add device A on device B and device B on device A for it to work. Did you do this? This will change as soon as #200 is merged

alazyworkaholic commented 1 week ago

No, I hadn't added the Windows computer in lan-mouse instance running on Linux. Doing so mostly fixed it for a while, but I couldn't move the cursor back to Windows by moving the cursor past the edge of any Linux screen (I have 2).

I quit lan-mouse then restarted some time later, and now it doesn't work again. When I reconnect the two machines as they were and move the cursor from the Windows screen to the right, this appears in the Linux terminal:

[2024-11-05T20:16:18Z WARN  lan_mouse::emulate::xdg_desktop_portal] Portal request failed: org.freedesktop.zbus.Error: Invalid session
--- The above line repeats upon any Windows mouse movement. I CTRL-C below and get:
^C[2024-11-05T20:18:44Z INFO  lan_mouse::server] terminating service
[2024-11-05T20:18:44Z INFO  lan_mouse::server::frontend_task] terminating gracefully...
[2024-11-05T20:18:44Z ERROR lan_mouse::emulate::xdg_desktop_portal] failed to close remote desktop session: Portal request failed: org.freedesktop.zbus.Error: Object does not exist at path “/org/freedesktop/portal/desktop/session/1_217/ashpd_B1WABoQwhp”

Remaining Issues:

UPDATE Tried again and it worked. I am not sure why but it may have to do with the two GNOME dialogs asking permission to accept remote input. It also now allows me to move my cursor back to the Windows machine.

However, my mouse wheel does not work.

feschber commented 1 week ago

For the cli: You can use the list command to list configured devices. The id is the number of the client (e.g. client 0:...) And also there is a help command, which shows available commands and how to use them.

libei input capture not available: ZBus Error: I/O error: Broken pipe (os error 32) This seems very strange, however it would explain, why you could not move the cursor back to the windows machine earlier.

Also given this error [2024-11-05T18:17:50Z ERROR lan_mouse::capture] falling back to dummy input capture, it should not be possible to move your mouse back to the windows machine, which is kind of strange.

feschber commented 6 days ago
* "cli" & "gtk" in config.toml should match the accepted Cli & Gtk parameters (1st letter capitalization)

this is now fixed in latest main (all lowercase now regardless of cli or config file).

Be aware the prerelease is incompatible with 0.9.1.

alazyworkaholic commented 3 days ago

I tried v0.10.0 on Windows but the GUI still doesn't work. I couldn't test the CLI because my nixos machine still only has v0.8.0; even the unstable branch is only at 0.9.3. If anyone else knows nixos, I'd love to know how to fetch & build a specific (latest) lan-mouse version.