[GH-ISSUE #37] Chrome OS support #8

Open
opened 2026-05-05 22:02:22 -06:00 by gitea-mirror · 29 comments
Owner

Originally created by @jsinterface on GitHub (Nov 26, 2023).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/37

trying to test this in a graphically rather limited wayland environment (chrome os), and i worked through a few errors to satisfy the gui dependencies, but libadwaita being a more complicated one, I'm just wishing for a way to opt out of building the gui and rely on the cli only:
image
is it already available just not mentioned in the readme?
Sorry if it could be determined with more familiarity with cargo toolchains.
Thanks!

Originally created by @jsinterface on GitHub (Nov 26, 2023). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/37 trying to test this in a graphically rather limited wayland environment (chrome os), and i worked through a few errors to satisfy the gui dependencies, but libadwaita being a more complicated one, I'm just wishing for a way to opt out of building the gui and rely on the cli only: ![image](https://github.com/feschber/lan-mouse/assets/26650418/4d7c3b56-f554-41dd-8d85-4a1597852bea) is it already available just not mentioned in the readme? Sorry if it could be determined with more familiarity with cargo toolchains. Thanks!
gitea-mirror added the
enhancement
label 2026-05-05 22:02:22 -06:00
Author
Owner

@feschber commented on GitHub (Nov 27, 2023):

Disabling individual features does not seem to be possible as of now:
https://github.com/rust-lang/cargo/issues/3126

There is two Options:

  • either build with --no-default-features and add all the features manually:
cargo build --release --no-default-features --features wayland,x11,xdg_desktop_portal
<!-- gh-comment-id:1827739630 --> @feschber commented on GitHub (Nov 27, 2023): Disabling individual features does not seem to be possible as of now: https://github.com/rust-lang/cargo/issues/3126 There is two Options: - either build with `--no-default-features` and add all the features manually: ```sh cargo build --release --no-default-features --features wayland,x11,xdg_desktop_portal ``` - or you could edit `Cargo.toml` and remove the feature from there: https://github.com/feschber/lan-mouse/blob/e88241e81629d2ac19d5fee7a150b13de871e47f/Cargo.toml#L52
Author
Owner

@feschber commented on GitHub (Nov 27, 2023):

If you could tell me what Distro you're using, I may be able to help you with getting libadwaita installed.

<!-- gh-comment-id:1827740877 --> @feschber commented on GitHub (Nov 27, 2023): If you could tell me what Distro you're using, I may be able to help you with getting libadwaita installed.
Author
Owner

@feschber commented on GitHub (Nov 27, 2023):

If you could tell me what Distro you're using, I may be able to help you with getting libadwaita installed.

Sorry I overlooked chrome os.

<!-- gh-comment-id:1827823235 --> @feschber commented on GitHub (Nov 27, 2023): > If you could tell me what Distro you're using, I may be able to help you with getting libadwaita installed. Sorry I overlooked chrome os.
Author
Owner

@feschber commented on GitHub (Dec 1, 2023):

Do you have an update on this?
I'm curious if chrome os works but I feel like they probably dont support the necessary wayland protocols or desktop portals.

<!-- gh-comment-id:1835900479 --> @feschber commented on GitHub (Dec 1, 2023): Do you have an update on this? I'm curious if chrome os works but I feel like they probably dont support the necessary wayland protocols or desktop portals.
Author
Owner

@jpeeler commented on GitHub (Dec 15, 2023):

I tried running in a Crostini container (with libadwaita-1-0 installed) and got this:

$ ./lan-mouse 
[2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:04Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:04Z WARN  lan_mouse::config] Continuing without config file ...
thread 'main' panicked at /var/home/jpeeler/src/lan-mouse/src/producer.rs:58:13:
could not detect session type: XDG_SESSION_TYPE environment variable not set!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
^C
jpeeler@jeff:~$ XDG_SESSION_TYPE=wayland ./lan-mouse 
[2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:43Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:43Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-15T20:20:43Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-15T20:20:43Z INFO  lan_mouse::producer] XDG_CURRENT_DESKTOP = X-Generic -> using layer_shell backend
[2023-12-15T20:20:43Z INFO  lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer
[2023-12-15T20:20:43Z WARN  lan_mouse::consumer] unknown XDG_CURRENT_DESKTOP -> defaulting to wlroots backend
[2023-12-15T20:20:43Z ERROR lan_mouse] xdg_output not supported!
<!-- gh-comment-id:1858446759 --> @jpeeler commented on GitHub (Dec 15, 2023): I tried running in a Crostini container (with libadwaita-1-0 installed) and got this: ``` $ ./lan-mouse [2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-15T20:20:04Z WARN lan_mouse::config] Continuing without config file ... [2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-15T20:20:04Z WARN lan_mouse::config] Continuing without config file ... thread 'main' panicked at /var/home/jpeeler/src/lan-mouse/src/producer.rs:58:13: could not detect session type: XDG_SESSION_TYPE environment variable not set! note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ^C jpeeler@jeff:~$ XDG_SESSION_TYPE=wayland ./lan-mouse [2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-15T20:20:43Z WARN lan_mouse::config] Continuing without config file ... [2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-15T20:20:43Z WARN lan_mouse::config] Continuing without config file ... [2023-12-15T20:20:43Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-15T20:20:43Z INFO lan_mouse::producer] XDG_CURRENT_DESKTOP = X-Generic -> using layer_shell backend [2023-12-15T20:20:43Z INFO lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer [2023-12-15T20:20:43Z WARN lan_mouse::consumer] unknown XDG_CURRENT_DESKTOP -> defaulting to wlroots backend [2023-12-15T20:20:43Z ERROR lan_mouse] xdg_output not supported! ```
Author
Owner

@feschber commented on GitHub (Dec 15, 2023):

I tried running in a Crostini container (with libadwaita-1-0 installed) and got this:

$ ./lan-mouse 
[2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:04Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:04Z WARN  lan_mouse::config] Continuing without config file ...
thread 'main' panicked at /var/home/jpeeler/src/lan-mouse/src/producer.rs:58:13:
could not detect session type: XDG_SESSION_TYPE environment variable not set!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
^C
jpeeler@jeff:~$ XDG_SESSION_TYPE=wayland ./lan-mouse 
[2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:43Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-15T20:20:43Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-15T20:20:43Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-15T20:20:43Z INFO  lan_mouse::producer] XDG_CURRENT_DESKTOP = X-Generic -> using layer_shell backend
[2023-12-15T20:20:43Z INFO  lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer
[2023-12-15T20:20:43Z WARN  lan_mouse::consumer] unknown XDG_CURRENT_DESKTOP -> defaulting to wlroots backend
[2023-12-15T20:20:43Z ERROR lan_mouse] xdg_output not supported!

You are on a Chromebook as well?

<!-- gh-comment-id:1858452000 --> @feschber commented on GitHub (Dec 15, 2023): > I tried running in a Crostini container (with libadwaita-1-0 installed) and got this: > > ``` > $ ./lan-mouse > [2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) > [2023-12-15T20:20:04Z WARN lan_mouse::config] Continuing without config file ... > [2023-12-15T20:20:04Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) > [2023-12-15T20:20:04Z WARN lan_mouse::config] Continuing without config file ... > thread 'main' panicked at /var/home/jpeeler/src/lan-mouse/src/producer.rs:58:13: > could not detect session type: XDG_SESSION_TYPE environment variable not set! > note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace > ^C > jpeeler@jeff:~$ XDG_SESSION_TYPE=wayland ./lan-mouse > [2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) > [2023-12-15T20:20:43Z WARN lan_mouse::config] Continuing without config file ... > [2023-12-15T20:20:43Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) > [2023-12-15T20:20:43Z WARN lan_mouse::config] Continuing without config file ... > [2023-12-15T20:20:43Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer > [2023-12-15T20:20:43Z INFO lan_mouse::producer] XDG_CURRENT_DESKTOP = X-Generic -> using layer_shell backend > [2023-12-15T20:20:43Z INFO lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer > [2023-12-15T20:20:43Z WARN lan_mouse::consumer] unknown XDG_CURRENT_DESKTOP -> defaulting to wlroots backend > [2023-12-15T20:20:43Z ERROR lan_mouse] xdg_output not supported! > ``` You are on a Chromebook as well?
Author
Owner

@jpeeler commented on GitHub (Dec 15, 2023):

Yeah (don't think Crostini exists anywhere else). I compiled the binary on a more powerful linux host and copied over the binary - I assume that doesn't matter.

<!-- gh-comment-id:1858456112 --> @jpeeler commented on GitHub (Dec 15, 2023): Yeah (don't think Crostini exists anywhere else). I compiled the binary on a more powerful linux host and copied over the binary - I assume that doesn't matter.
Author
Owner

@feschber commented on GitHub (Dec 15, 2023):

Could you run wayland-info in that container and list the supported interfaces here?

For input capture either the wlr_layer_shell protocol would need to be implemented or libei support is required
and for input emulation the best bet is probably the remote desktop portal but I don't think that is available in chrome os either.

I would not get my hopes up too much that any of this works in Chrome OS unfortunately.

<!-- gh-comment-id:1858467384 --> @feschber commented on GitHub (Dec 15, 2023): Could you run `wayland-info` in that container and list the supported interfaces here? For input capture either the `wlr_layer_shell` protocol would need to be implemented or libei support is required and for input emulation the best bet is probably the remote desktop portal but I don't think that is available in chrome os either. I would not get my hopes up too much that any of this works in Chrome OS unfortunately.
Author
Owner

@jpeeler commented on GitHub (Dec 15, 2023):

$ wayland-info
interface: 'wl_compositor',                              version:  4, name:  1
interface: 'wl_shm',                                     version:  1, name:  2
        formats (fourcc):
        0x36314752 = 'RG16'
                 1 = 'XR24'
                 0 = 'AR24'
        0x34324258 = 'XB24'
        0x34324241 = 'AB24'
        0x3231564e = 'NV12'
interface: 'wl_drm',                                     version:  2, name:  3
interface: 'wl_subcompositor',                           version:  1, name:  4
interface: 'wl_output',                                  version:  3, name:  5
        x: 0, y: 0, scale: 2,
        physical_width: 260 mm, physical_height: 173 mm,
        make: 'unknown', model: 'unknown',
        subpixel_orientation: unknown, output_transform: normal,
        mode:
                width: 2400 px, height: 1600 px, refresh: 60.000 Hz,
                flags: current preferred
interface: 'wl_data_device_manager',                     version:  3, name:  6
interface: 'wp_fractional_scale_manager_v1',             version:  1, name:  7
interface: 'wp_viewporter',                              version:  1, name:  8
interface: 'zwp_tablet_manager_v2',                      version:  1, name:  9
        tablet_seat: default
                tablet: Touchscreen
                        vendor: 0
                        product: 0
                tablet_tool: eraser
                        capabilities: tilt pressure
                tablet_tool: pen
                        capabilities: tilt pressure
interface: 'wl_seat',                                    version:  5, name: 10
        name: default
        capabilities: pointer keyboard touch
        keyboard repeat rate: 20
        keyboard repeat delay: 500
interface: 'gtk_shell1',                                 version:  1, name: 11
interface: 'wl_shell',                                   version:  1, name: 12
interface: 'zwp_pointer_constraints_v1',                 version:  1, name: 13
interface: 'zwp_relative_pointer_manager_v1',            version:  1, name: 14
interface: 'zwp_idle_inhibit_manager_v1',                version:  1, name: 15
interface: 'zwp_text_input_manager_v1',                  version:  1, name: 16
interface: 'zcr_text_input_crostini_manager_v1',         version:  1, name: 17
interface: 'zcr_text_input_x11_v1',                      version:  1, name: 18
interface: 'zcr_text_input_extension_v1',                version: 11, name: 19
interface: 'xdg_wm_base',                                version:  3, name: 20

I don't really have my hopes up for ChromeOS. But I am interested in the rest of the operating systems, especially Linux+MacOS. If I can help debug integration any there let me know.

<!-- gh-comment-id:1858475106 --> @jpeeler commented on GitHub (Dec 15, 2023): ``` $ wayland-info interface: 'wl_compositor', version: 4, name: 1 interface: 'wl_shm', version: 1, name: 2 formats (fourcc): 0x36314752 = 'RG16' 1 = 'XR24' 0 = 'AR24' 0x34324258 = 'XB24' 0x34324241 = 'AB24' 0x3231564e = 'NV12' interface: 'wl_drm', version: 2, name: 3 interface: 'wl_subcompositor', version: 1, name: 4 interface: 'wl_output', version: 3, name: 5 x: 0, y: 0, scale: 2, physical_width: 260 mm, physical_height: 173 mm, make: 'unknown', model: 'unknown', subpixel_orientation: unknown, output_transform: normal, mode: width: 2400 px, height: 1600 px, refresh: 60.000 Hz, flags: current preferred interface: 'wl_data_device_manager', version: 3, name: 6 interface: 'wp_fractional_scale_manager_v1', version: 1, name: 7 interface: 'wp_viewporter', version: 1, name: 8 interface: 'zwp_tablet_manager_v2', version: 1, name: 9 tablet_seat: default tablet: Touchscreen vendor: 0 product: 0 tablet_tool: eraser capabilities: tilt pressure tablet_tool: pen capabilities: tilt pressure interface: 'wl_seat', version: 5, name: 10 name: default capabilities: pointer keyboard touch keyboard repeat rate: 20 keyboard repeat delay: 500 interface: 'gtk_shell1', version: 1, name: 11 interface: 'wl_shell', version: 1, name: 12 interface: 'zwp_pointer_constraints_v1', version: 1, name: 13 interface: 'zwp_relative_pointer_manager_v1', version: 1, name: 14 interface: 'zwp_idle_inhibit_manager_v1', version: 1, name: 15 interface: 'zwp_text_input_manager_v1', version: 1, name: 16 interface: 'zcr_text_input_crostini_manager_v1', version: 1, name: 17 interface: 'zcr_text_input_x11_v1', version: 1, name: 18 interface: 'zcr_text_input_extension_v1', version: 11, name: 19 interface: 'xdg_wm_base', version: 3, name: 20 ``` I don't really have my hopes up for ChromeOS. But I am interested in the rest of the operating systems, especially Linux+MacOS. If I can help debug integration any there let me know.
Author
Owner

@feschber commented on GitHub (Dec 15, 2023):

gtk_shell1 might be a valid fallback for layer_shell but at least zwp_keyboard_shortcuts_inhibit_manager_v1 would still be required to do anything useful.

If I can help debug integration any there let me know.

Will do :) Still in pretty early development.

<!-- gh-comment-id:1858532179 --> @feschber commented on GitHub (Dec 15, 2023): gtk_shell1 _might_ be a valid fallback for layer_shell but at least [zwp_keyboard_shortcuts_inhibit_manager_v1](https://wayland.app/protocols/keyboard-shortcuts-inhibit-unstable-v1#zwp_keyboard_shortcuts_inhibit_manager_v1) would still be required to do anything useful. > If I can help debug integration any there let me know. Will do :) Still in pretty early development.
Author
Owner

@jsinterface commented on GitHub (Dec 16, 2023):

sorry i dropped out a bit, i layed off trying to control my chromebooks for a bit, but i'm still interested and will get back to testing.
Two things i'd note is i think building on another linux distro and copying the binary may not be indifferent (statically linked libraries missing or dynamic env assumptions differing). In my build attempts i was building on crostini directly, and running from there, but you could also be right @jpeeler .
Secondly, in chromeos, crostini is a virtual machine with a little more integration than usual which makes it a viable candidate, but there is also the host "crosh" (chromeos shell) system with more limited, but at least not virtual linux environment which i was also testing against.
I'll return to keep on testing, i just missed notifications of your engagement here, but i'm happy to see the support, thanks!

<!-- gh-comment-id:1858716809 --> @jsinterface commented on GitHub (Dec 16, 2023): sorry i dropped out a bit, i layed off trying to control my chromebooks for a bit, but i'm still interested and will get back to testing. Two things i'd note is i think building on another linux distro and copying the binary may not be indifferent (statically linked libraries missing or dynamic env assumptions differing). In my build attempts i was building on crostini directly, and running from there, but you could also be right @jpeeler . Secondly, in chromeos, crostini is a virtual machine with a little more integration than usual which makes it a viable candidate, but there is also the host "crosh" (chromeos shell) system with more limited, but at least not virtual linux environment which i was also testing against. I'll return to keep on testing, i just missed notifications of your engagement here, but i'm happy to see the support, thanks!
Author
Owner

@feschber commented on GitHub (Dec 16, 2023):

Cheers!
You could do one more thing: Try to run with XDG_CURRENT_DESKTOP=KDE. That way we can tell whether or not the remote desktop portal is available.

At least rudimentary input capture should always be possible through an application window. I feel Iike input emulation might be the bigger problem

<!-- gh-comment-id:1858752676 --> @feschber commented on GitHub (Dec 16, 2023): Cheers! You could do one more thing: Try to run with XDG_CURRENT_DESKTOP=KDE. That way we can tell whether or not the remote desktop portal is available. At least rudimentary input capture should always be possible through an application window. I feel Iike input emulation might be the bigger problem
Author
Owner

@jpeeler commented on GitHub (Dec 16, 2023):

Is this what you were asking about, @feschber ?

$ XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=kde ./lan-mouse 
[2023-12-16T13:32:51Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T13:32:51Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T13:32:51Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T13:32:51Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T13:32:51Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-16T13:32:51Z INFO  lan_mouse::producer] XDG_CURRENT_DESKTOP = kde -> using layer_shell backend
[2023-12-16T13:32:51Z INFO  lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer
[2023-12-16T13:32:51Z WARN  lan_mouse::consumer] unknown XDG_CURRENT_DESKTOP -> defaulting to wlroots backend
[2023-12-16T13:32:51Z ERROR lan_mouse] xdg_output not supported!

I thought that the remote desktop portal was something to be installed. Surprisingly I do have xdg-desktop-portal-gtk and xdg-desktop-portal installed. Wondering if switching to the KDE version would be helpful, though when I set the current desktop to gnome I get the exact same output.

@bpstrngr I thought crosh was restricted to executing Chrome management utilities. You're saying there's a way to run scripts/binaries in that environment?

<!-- gh-comment-id:1858838354 --> @jpeeler commented on GitHub (Dec 16, 2023): Is this what you were asking about, @feschber ? ``` $ XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=kde ./lan-mouse [2023-12-16T13:32:51Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T13:32:51Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T13:32:51Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T13:32:51Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T13:32:51Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-16T13:32:51Z INFO lan_mouse::producer] XDG_CURRENT_DESKTOP = kde -> using layer_shell backend [2023-12-16T13:32:51Z INFO lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer [2023-12-16T13:32:51Z WARN lan_mouse::consumer] unknown XDG_CURRENT_DESKTOP -> defaulting to wlroots backend [2023-12-16T13:32:51Z ERROR lan_mouse] xdg_output not supported! ``` I thought that the remote desktop portal was something to be installed. Surprisingly I do have xdg-desktop-portal-gtk and xdg-desktop-portal installed. Wondering if switching to the KDE version would be helpful, though when I set the current desktop to gnome I get the exact same output. @bpstrngr I thought crosh was restricted to executing Chrome management utilities. You're saying there's a way to run scripts/binaries in that environment?
Author
Owner

@feschber commented on GitHub (Dec 16, 2023):

It must be capital KDE, what you want is the xdg-desktop-portal backend

<!-- gh-comment-id:1858838775 --> @feschber commented on GitHub (Dec 16, 2023): It must be capital KDE, what you want is the xdg-desktop-portal backend
Author
Owner

@jpeeler commented on GitHub (Dec 16, 2023):

$ XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse 
[2023-12-16T15:05:42Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T15:05:42Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T15:05:42Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T15:05:42Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T15:05:42Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-16T15:05:42Z INFO  lan_mouse::producer] XDG_CURRENT_DESKTOP = KDE -> using layer_shell backend
[2023-12-16T15:05:43Z INFO  lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer
[2023-12-16T15:05:43Z INFO  lan_mouse::consumer] XDG_CURRENT_DESKTOP = KDE -> using xdg_desktop_portal backend
[2023-12-16T15:05:43Z ERROR lan_mouse] xdg_output not supported!
<!-- gh-comment-id:1858839802 --> @jpeeler commented on GitHub (Dec 16, 2023): ``` $ XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse [2023-12-16T15:05:42Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T15:05:42Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T15:05:42Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T15:05:42Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T15:05:42Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-16T15:05:42Z INFO lan_mouse::producer] XDG_CURRENT_DESKTOP = KDE -> using layer_shell backend [2023-12-16T15:05:43Z INFO lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer [2023-12-16T15:05:43Z INFO lan_mouse::consumer] XDG_CURRENT_DESKTOP = KDE -> using xdg_desktop_portal backend [2023-12-16T15:05:43Z ERROR lan_mouse] xdg_output not supported! ```
Author
Owner

@feschber commented on GitHub (Dec 16, 2023):

Can you rerun this with LAN_MOUSE_LOG_LEVEL=debug?

<!-- gh-comment-id:1858841515 --> @feschber commented on GitHub (Dec 16, 2023): Can you rerun this with LAN_MOUSE_LOG_LEVEL=debug?
Author
Owner

@jpeeler commented on GitHub (Dec 16, 2023):

$ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse 
[2023-12-16T15:21:22Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T15:21:22Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T15:21:22Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: false }
[2023-12-16T15:21:22Z DEBUG lan_mouse::frontend::gtk] running gtk frontend
[2023-12-16T15:21:22Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T15:21:22Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T15:21:22Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: true }
[2023-12-16T15:21:22Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2023-12-16T15:21:22Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-16T15:21:22Z INFO  lan_mouse::producer] XDG_CURRENT_DESKTOP = KDE -> using layer_shell backend
[2023-12-16T15:21:22Z INFO  lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer
[2023-12-16T15:21:22Z INFO  lan_mouse::consumer] XDG_CURRENT_DESKTOP = KDE -> using xdg_desktop_portal backend
[2023-12-16T15:21:22Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2023-12-16T15:21:22Z ERROR lan_mouse] xdg_output not supported!
[2023-12-16T15:21:22Z DEBUG lan_mouse::frontend::gtk] connecting to lan-mouse-socket
CLI run
$ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse -f cli
[2023-12-16T15:21:01Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T15:21:01Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T15:21:01Z DEBUG lan_mouse] Config { frontend: Cli, port: 4242, clients: [], daemon: false }
[2023-12-16T15:21:01Z ERROR lan_mouse] Could not connect to lan-mouse-socket
jpeeler@jeff:~$ [2023-12-16T15:21:01Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-16T15:21:01Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-16T15:21:01Z DEBUG lan_mouse] Config { frontend: Cli, port: 4242, clients: [], daemon: true }
[2023-12-16T15:21:01Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2023-12-16T15:21:01Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-16T15:21:01Z INFO  lan_mouse::producer] XDG_CURRENT_DESKTOP = KDE -> using layer_shell backend
[2023-12-16T15:21:01Z INFO  lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer
[2023-12-16T15:21:01Z INFO  lan_mouse::consumer] XDG_CURRENT_DESKTOP = KDE -> using xdg_desktop_portal backend
[2023-12-16T15:21:01Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2023-12-16T15:21:01Z ERROR lan_mouse] xdg_output not supported!
<!-- gh-comment-id:1858843202 --> @jpeeler commented on GitHub (Dec 16, 2023): ``` $ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse [2023-12-16T15:21:22Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T15:21:22Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T15:21:22Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: false } [2023-12-16T15:21:22Z DEBUG lan_mouse::frontend::gtk] running gtk frontend [2023-12-16T15:21:22Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T15:21:22Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T15:21:22Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: true } [2023-12-16T15:21:22Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock" [2023-12-16T15:21:22Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-16T15:21:22Z INFO lan_mouse::producer] XDG_CURRENT_DESKTOP = KDE -> using layer_shell backend [2023-12-16T15:21:22Z INFO lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer [2023-12-16T15:21:22Z INFO lan_mouse::consumer] XDG_CURRENT_DESKTOP = KDE -> using xdg_desktop_portal backend [2023-12-16T15:21:22Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock" [2023-12-16T15:21:22Z ERROR lan_mouse] xdg_output not supported! [2023-12-16T15:21:22Z DEBUG lan_mouse::frontend::gtk] connecting to lan-mouse-socket ``` <details> <summary>CLI run</summary> ``` $ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse -f cli [2023-12-16T15:21:01Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T15:21:01Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T15:21:01Z DEBUG lan_mouse] Config { frontend: Cli, port: 4242, clients: [], daemon: false } [2023-12-16T15:21:01Z ERROR lan_mouse] Could not connect to lan-mouse-socket jpeeler@jeff:~$ [2023-12-16T15:21:01Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-16T15:21:01Z WARN lan_mouse::config] Continuing without config file ... [2023-12-16T15:21:01Z DEBUG lan_mouse] Config { frontend: Cli, port: 4242, clients: [], daemon: true } [2023-12-16T15:21:01Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock" [2023-12-16T15:21:01Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-16T15:21:01Z INFO lan_mouse::producer] XDG_CURRENT_DESKTOP = KDE -> using layer_shell backend [2023-12-16T15:21:01Z INFO lan_mouse::consumer] XDG_SESSION_TYPE = wayland -> using wayland event consumer [2023-12-16T15:21:01Z INFO lan_mouse::consumer] XDG_CURRENT_DESKTOP = KDE -> using xdg_desktop_portal backend [2023-12-16T15:21:01Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock" [2023-12-16T15:21:01Z ERROR lan_mouse] xdg_output not supported! ``` </details>
Author
Owner

@feschber commented on GitHub (Dec 16, 2023):

Okay, seems like I need to add some more debug information first.

<!-- gh-comment-id:1858843632 --> @feschber commented on GitHub (Dec 16, 2023): Okay, seems like I need to add some more debug information first.
Author
Owner

@feschber commented on GitHub (Dec 17, 2023):

@jpeeler you can try the latest main now. I added a fallback interface so it does not crash before we know whats going on.
XDG_CURRENT_DESKTOP=KDE is not required anymore

<!-- gh-comment-id:1859246716 --> @feschber commented on GitHub (Dec 17, 2023): @jpeeler you can try the latest main now. I added a fallback interface so it does not crash before we know whats going on. XDG_CURRENT_DESKTOP=KDE is not required anymore
Author
Owner

@jpeeler commented on GitHub (Dec 17, 2023):

(Using a6ab109fae).

$ LAN_MOUSE_LOG_LEVEL=debug ./lan-mouse 
[2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-17T19:49:05Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: false }
[2023-12-17T19:49:05Z DEBUG lan_mouse::frontend::gtk] running gtk frontend
[2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-17T19:49:05Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: true }
[2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] "/run/user/1000/lan-mouse-socket.sock": Connection refused (os error 111) - removing left behind socket
[2023-12-17T19:49:05Z INFO  lan_mouse::producer] libei event producer not available: not implemented
[2023-12-17T19:49:06Z INFO  lan_mouse::producer] layer_shell event producer not available: xdg_output not supported!
[2023-12-17T19:49:06Z INFO  lan_mouse::producer] x11 event producer not available: not implemented
[2023-12-17T19:49:06Z ERROR lan_mouse::producer] falling back to dummy event producer
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] wayland backend not available: wl_seat >= v7 not supported
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] libei not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] connecting to org.freedesktop.portal.RemoteDesktop portal ...
[2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] creating session ...
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] remote desktop portal not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] using x11 event consumer
[2023-12-17T19:49:06Z INFO  lan_mouse] Press Ctrl+Alt+Shift+Super to release the mouse
[2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connecting to lan-mouse-socket
[2023-12-17T19:49:06Z DEBUG lan_mouse::frontend] json: {"Enumerate":[]}, len: 16
[2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connected to lan-mouse-socket

(lan-mouse:4557): Gtk-CRITICAL **: 14:49:06.203: Error building template class 'LanMouseWindow' for an instance of type 'LanMouseWindow': .:0:0 Invalid object type 'AdwToolbarView'
thread 'main' panicked at /home/jpeeler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gtk4-0.7.2/src/subclass/widget.rs:1244:17:
Failed to retrieve template child. Please check that all fields of type `GtkButton` have been bound and have a #[template_child] attribute.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
<!-- gh-comment-id:1859264135 --> @jpeeler commented on GitHub (Dec 17, 2023): (Using https://github.com/feschber/lan-mouse/commit/a6ab109faea8acd266fafe0a4c5a7e9b02c00fec). ``` $ LAN_MOUSE_LOG_LEVEL=debug ./lan-mouse [2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-17T19:49:05Z WARN lan_mouse::config] Continuing without config file ... [2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: false } [2023-12-17T19:49:05Z DEBUG lan_mouse::frontend::gtk] running gtk frontend [2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2023-12-17T19:49:05Z WARN lan_mouse::config] Continuing without config file ... [2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: true } [2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock" [2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] "/run/user/1000/lan-mouse-socket.sock": Connection refused (os error 111) - removing left behind socket [2023-12-17T19:49:05Z INFO lan_mouse::producer] libei event producer not available: not implemented [2023-12-17T19:49:06Z INFO lan_mouse::producer] layer_shell event producer not available: xdg_output not supported! [2023-12-17T19:49:06Z INFO lan_mouse::producer] x11 event producer not available: not implemented [2023-12-17T19:49:06Z ERROR lan_mouse::producer] falling back to dummy event producer [2023-12-17T19:49:06Z INFO lan_mouse::consumer] wayland backend not available: wl_seat >= v7 not supported [2023-12-17T19:49:06Z INFO lan_mouse::consumer] libei not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop [2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] connecting to org.freedesktop.portal.RemoteDesktop portal ... [2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] creating session ... [2023-12-17T19:49:06Z INFO lan_mouse::consumer] remote desktop portal not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop [2023-12-17T19:49:06Z INFO lan_mouse::consumer] using x11 event consumer [2023-12-17T19:49:06Z INFO lan_mouse] Press Ctrl+Alt+Shift+Super to release the mouse [2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connecting to lan-mouse-socket [2023-12-17T19:49:06Z DEBUG lan_mouse::frontend] json: {"Enumerate":[]}, len: 16 [2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connected to lan-mouse-socket (lan-mouse:4557): Gtk-CRITICAL **: 14:49:06.203: Error building template class 'LanMouseWindow' for an instance of type 'LanMouseWindow': .:0:0 Invalid object type 'AdwToolbarView' thread 'main' panicked at /home/jpeeler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gtk4-0.7.2/src/subclass/widget.rs:1244:17: Failed to retrieve template child. Please check that all fields of type `GtkButton` have been bound and have a #[template_child] attribute. note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
Author
Owner

@feschber commented on GitHub (Dec 18, 2023):

Okay seems like the remote desktop portal is not available. XTest likely wont work either.

<!-- gh-comment-id:1860064158 --> @feschber commented on GitHub (Dec 18, 2023): Okay seems like the remote desktop portal is not available. XTest likely wont work either.
Author
Owner

@feschber commented on GitHub (Dec 19, 2023):

(Using a6ab109).

$ LAN_MOUSE_LOG_LEVEL=debug ./lan-mouse 
[2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-17T19:49:05Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: false }
[2023-12-17T19:49:05Z DEBUG lan_mouse::frontend::gtk] running gtk frontend
[2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2023-12-17T19:49:05Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: true }
[2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] "/run/user/1000/lan-mouse-socket.sock": Connection refused (os error 111) - removing left behind socket
[2023-12-17T19:49:05Z INFO  lan_mouse::producer] libei event producer not available: not implemented
[2023-12-17T19:49:06Z INFO  lan_mouse::producer] layer_shell event producer not available: xdg_output not supported!
[2023-12-17T19:49:06Z INFO  lan_mouse::producer] x11 event producer not available: not implemented
[2023-12-17T19:49:06Z ERROR lan_mouse::producer] falling back to dummy event producer
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] wayland backend not available: wl_seat >= v7 not supported
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] libei not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] connecting to org.freedesktop.portal.RemoteDesktop portal ...
[2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] creating session ...
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] remote desktop portal not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2023-12-17T19:49:06Z INFO  lan_mouse::consumer] using x11 event consumer
[2023-12-17T19:49:06Z INFO  lan_mouse] Press Ctrl+Alt+Shift+Super to release the mouse
[2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connecting to lan-mouse-socket
[2023-12-17T19:49:06Z DEBUG lan_mouse::frontend] json: {"Enumerate":[]}, len: 16
[2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connected to lan-mouse-socket

(lan-mouse:4557): Gtk-CRITICAL **: 14:49:06.203: Error building template class 'LanMouseWindow' for an instance of type 'LanMouseWindow': .:0:0 Invalid object type 'AdwToolbarView'
thread 'main' panicked at /home/jpeeler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gtk4-0.7.2/src/subclass/widget.rs:1244:17:
Failed to retrieve template child. Please check that all fields of type `GtkButton` have been bound and have a #[template_child] attribute.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This Gtk-CRITICAL error is because I had used widgets from libadwaita-1.4 (accidentally). If you try the latest main, you may be able to get the gui to launch.

<!-- gh-comment-id:1863481542 --> @feschber commented on GitHub (Dec 19, 2023): > (Using [a6ab109](https://github.com/feschber/lan-mouse/commit/a6ab109faea8acd266fafe0a4c5a7e9b02c00fec)). > > ``` > $ LAN_MOUSE_LOG_LEVEL=debug ./lan-mouse > [2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) > [2023-12-17T19:49:05Z WARN lan_mouse::config] Continuing without config file ... > [2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: false } > [2023-12-17T19:49:05Z DEBUG lan_mouse::frontend::gtk] running gtk frontend > [2023-12-17T19:49:05Z ERROR lan_mouse::config] /home/jpeeler/.config/lan-mouse/config.toml: No such file or directory (os error 2) > [2023-12-17T19:49:05Z WARN lan_mouse::config] Continuing without config file ... > [2023-12-17T19:49:05Z DEBUG lan_mouse] Config { frontend: Gtk, port: 4242, clients: [], daemon: true } > [2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock" > [2023-12-17T19:49:05Z DEBUG lan_mouse::frontend] "/run/user/1000/lan-mouse-socket.sock": Connection refused (os error 111) - removing left behind socket > [2023-12-17T19:49:05Z INFO lan_mouse::producer] libei event producer not available: not implemented > [2023-12-17T19:49:06Z INFO lan_mouse::producer] layer_shell event producer not available: xdg_output not supported! > [2023-12-17T19:49:06Z INFO lan_mouse::producer] x11 event producer not available: not implemented > [2023-12-17T19:49:06Z ERROR lan_mouse::producer] falling back to dummy event producer > [2023-12-17T19:49:06Z INFO lan_mouse::consumer] wayland backend not available: wl_seat >= v7 not supported > [2023-12-17T19:49:06Z INFO lan_mouse::consumer] libei not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop > [2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] connecting to org.freedesktop.portal.RemoteDesktop portal ... > [2023-12-17T19:49:06Z DEBUG lan_mouse::backend::consumer::xdg_desktop_portal] creating session ... > [2023-12-17T19:49:06Z INFO lan_mouse::consumer] remote desktop portal not available: ZBus Error: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop > [2023-12-17T19:49:06Z INFO lan_mouse::consumer] using x11 event consumer > [2023-12-17T19:49:06Z INFO lan_mouse] Press Ctrl+Alt+Shift+Super to release the mouse > [2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connecting to lan-mouse-socket > [2023-12-17T19:49:06Z DEBUG lan_mouse::frontend] json: {"Enumerate":[]}, len: 16 > [2023-12-17T19:49:06Z DEBUG lan_mouse::frontend::gtk] connected to lan-mouse-socket > > (lan-mouse:4557): Gtk-CRITICAL **: 14:49:06.203: Error building template class 'LanMouseWindow' for an instance of type 'LanMouseWindow': .:0:0 Invalid object type 'AdwToolbarView' > thread 'main' panicked at /home/jpeeler/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gtk4-0.7.2/src/subclass/widget.rs:1244:17: > Failed to retrieve template child. Please check that all fields of type `GtkButton` have been bound and have a #[template_child] attribute. > note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace > ``` This Gtk-CRITICAL error is because I had used widgets from libadwaita-1.4 (accidentally). If you try the latest main, you may be able to get the gui to launch.
Author
Owner

@jpeeler commented on GitHub (Dec 19, 2023):

Yep, I was compiling against libadwaita-rs 0.5.2. The GUI does indeed launch, which is nice.

<!-- gh-comment-id:1863506324 --> @jpeeler commented on GitHub (Dec 19, 2023): Yep, I was compiling against libadwaita-rs 0.5.2. The GUI does indeed launch, which is nice.
Author
Owner

@jpeeler commented on GitHub (Dec 19, 2023):

Something I just wondered - do you know of any necessary portal versions that are required to get things to work? This linux container I'm testing with is running Debian 12. The KDE portal is 5.27.5, which seems to be around 7 months old. But maybe everything that is required has been implemented for a while and the problem is more so on the ChromeOS wayland side.

<!-- gh-comment-id:1863512027 --> @jpeeler commented on GitHub (Dec 19, 2023): Something I just wondered - do you know of any necessary portal versions that are required to get things to work? This linux container I'm testing with is running Debian 12. The KDE portal is 5.27.5, which seems to be around 7 months old. But maybe everything that is required has been implemented for a while and the problem is more so on the ChromeOS wayland side.
Author
Owner

@feschber commented on GitHub (Dec 19, 2023):

For input emulation only the remote desktop portal is required. (org.freedesktop.portal.RemoteDesktop).
This has been around for a quite a while in xdg-desktop-portal-kde.

Do I understand correctly that you are running KDE on a Linux container in ChromeOS?

Can you check the output of qdbus?
It should list all of the available portals.

<!-- gh-comment-id:1863534339 --> @feschber commented on GitHub (Dec 19, 2023): For input emulation only the remote desktop portal is required. (org.freedesktop.portal.RemoteDesktop). This has been around for a quite a while in xdg-desktop-portal-kde. Do I understand correctly that you are running KDE on a Linux container in ChromeOS? Can you check the output of `qdbus`? It should list all of the available portals.
Author
Owner

@jpeeler commented on GitHub (Dec 19, 2023):

The xdg-desktop-portal package is 1.16.0, which is about 12 months old. And I realized that I only had the -gtk portal installed earlier. However, it doesn't change the result all that much.

I am not running KDE as a desktop environment on ChromeOS if that's what you're asking. But am using their packages to run various apps (such as VLC).

$ /usr/lib/qt6/bin/qdbus
:1.10
 org.freedesktop.portal.Desktop
:1.11
 org.freedesktop.portal.Documents
:1.12
 org.freedesktop.impl.portal.PermissionStore
:1.13
 org.freedesktop.impl.portal.desktop.gtk
:1.14
:1.15
 org.a11y.Bus
:1.16
:1.17
:1.2
 org.freedesktop.systemd1
:1.37
 org.freedesktop.Flatpak
:1.4
 org.pulseaudio.Server
:1.40
 org.freedesktop.Notifications
:1.5
:1.51
 org.mozilla.firefox.ZGVmYXVsdC1yZWxlYXNl
:1.53
:1.58
:1.59
:1.6
:1.7
 org.freedesktop.ScreenSaver
:1.8
 org.freedesktop.impl.portal.desktop.cros
org.freedesktop.DBus

I don't understand why the KDE portal is not listed though.

<!-- gh-comment-id:1863575368 --> @jpeeler commented on GitHub (Dec 19, 2023): The xdg-desktop-portal package is 1.16.0, which is about 12 months old. And I realized that I only had the -gtk portal installed earlier. However, it doesn't change the result all that much. I am not running KDE as a desktop environment on ChromeOS if that's what you're asking. But am using their packages to run various apps (such as VLC). ``` $ /usr/lib/qt6/bin/qdbus :1.10 org.freedesktop.portal.Desktop :1.11 org.freedesktop.portal.Documents :1.12 org.freedesktop.impl.portal.PermissionStore :1.13 org.freedesktop.impl.portal.desktop.gtk :1.14 :1.15 org.a11y.Bus :1.16 :1.17 :1.2 org.freedesktop.systemd1 :1.37 org.freedesktop.Flatpak :1.4 org.pulseaudio.Server :1.40 org.freedesktop.Notifications :1.5 :1.51 org.mozilla.firefox.ZGVmYXVsdC1yZWxlYXNl :1.53 :1.58 :1.59 :1.6 :1.7 org.freedesktop.ScreenSaver :1.8 org.freedesktop.impl.portal.desktop.cros org.freedesktop.DBus ``` I don't understand why the KDE portal is not listed though.
Author
Owner

@jsinterface commented on GitHub (Dec 24, 2023):

found the time to test this too, starting from the point where you taught me how to opt out of libadwaita, i compiled with cargo build --release --no-default-features --features wayland in crostini.
inside crostini, it's the same result as for jpeeler,

$ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE RUST_BACKTRACE=1 ./target/release/lan-mouse
[2023-12-24T14:32:51Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-24T14:32:51Z ERROR lan_mouse] xdg_output not supported!

The thing i can add, for what it's worth, is what happens outside crostini, on the host chromeos shell:

$ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse
[2023-12-24T15:15:47Z ERROR lan_mouse::config] config.toml: No such file or directory (os error 2)
[2023-12-24T15:15:47Z WARN  lan_mouse::config] Continuing without config file ...
[2023-12-24T15:15:47Z INFO  lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer
[2023-12-24T15:15:47Z ERROR lan_mouse] could not connect to wayland compositor: NoCompositor

or, when built with "x11,xdg_desktop_portal" features included:

./lan-mouse: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory

(been down the rabbit hole of building/copying such libs individually, in this case i assume the list would be long, so i just didn't include these features, X11 will certainly be ever foreign to the native chromeos shell).
And yes, @jpeeler official chromeos distributions lock the user out of the host shell, but "switching to dev mode", or chromium os builds, give access to it. it's a really minimal raspberry pi-like gentoo environment with not even portage being functional (although i commonly run nodejs/python there without any problems), so probably won't be easy to give any more diagnostics about the wayland environment.

<!-- gh-comment-id:1868545447 --> @jsinterface commented on GitHub (Dec 24, 2023): found the time to test this too, starting from the point where you taught me how to opt out of libadwaita, i compiled with `cargo build --release --no-default-features --features wayland` in crostini. inside crostini, it's the same result as for jpeeler, ``` $ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE RUST_BACKTRACE=1 ./target/release/lan-mouse [2023-12-24T14:32:51Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-24T14:32:51Z ERROR lan_mouse] xdg_output not supported! ``` The thing i can add, for what it's worth, is what happens outside crostini, on the host chromeos shell: ``` $ LAN_MOUSE_LOG_LEVEL=debug XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=KDE ./lan-mouse [2023-12-24T15:15:47Z ERROR lan_mouse::config] config.toml: No such file or directory (os error 2) [2023-12-24T15:15:47Z WARN lan_mouse::config] Continuing without config file ... [2023-12-24T15:15:47Z INFO lan_mouse::producer] XDG_SESSION_TYPE = wayland -> using wayland event producer [2023-12-24T15:15:47Z ERROR lan_mouse] could not connect to wayland compositor: NoCompositor ``` or, when built with "x11,xdg_desktop_portal" features included: ``` ./lan-mouse: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory ``` (been down the rabbit hole of building/copying such libs individually, in this case i assume the list would be long, so i just didn't include these features, X11 will certainly be ever foreign to the native chromeos shell). And yes, @jpeeler official chromeos distributions lock the user out of the host shell, but "switching to dev mode", or chromium os builds, give access to it. it's a really minimal raspberry pi-like gentoo environment with not even portage being functional (although i commonly run nodejs/python there without any problems), so probably won't be easy to give any more diagnostics about the wayland environment.
Author
Owner

@jsinterface commented on GitHub (Dec 24, 2023):

Oh, and mind you, i had to checkout the v0.3.3 tag, because on the latest main, and several commits back, cargo build --release on crostini has started failing with

$ cargo build --release --no-default-features --features wayland
    Updating crates.io index
    Updating git repository `https://github.com/ids1024/reis`
warning: spurious network error (3 tries remaining): failed to mmap. Could not write data: Invalid argument; class=Os (2)
warning: spurious network error (2 tries remaining): failed to mmap. Could not write data: Invalid argument; class=Os (2)
warning: spurious network error (1 tries remaining): failed to mmap. Could not write data: Invalid argument; class=Os (2)
error: failed to get `reis` as a dependency of package `lan-mouse v0.4.0 (/home/ranger/crostini/lan-mouse)`

Caused by:
  failed to load source for dependency `reis`

Caused by:
  Unable to update https://github.com/ids1024/reis#a12f7e41

Caused by:
  failed to fetch into: /home/ranger/shuttle/x86/../rust/x86_64-unknown-linux-gnu/cargo/git/db/reis-ad85acfe9d586b15

Caused by:
  failed to mmap. Could not write data: Invalid argument; class=Os (2)
<!-- gh-comment-id:1868547665 --> @jsinterface commented on GitHub (Dec 24, 2023): Oh, and mind you, i had to checkout the v0.3.3 tag, because on the latest main, and several commits back, `cargo build --release` on crostini has started failing with ``` $ cargo build --release --no-default-features --features wayland Updating crates.io index Updating git repository `https://github.com/ids1024/reis` warning: spurious network error (3 tries remaining): failed to mmap. Could not write data: Invalid argument; class=Os (2) warning: spurious network error (2 tries remaining): failed to mmap. Could not write data: Invalid argument; class=Os (2) warning: spurious network error (1 tries remaining): failed to mmap. Could not write data: Invalid argument; class=Os (2) error: failed to get `reis` as a dependency of package `lan-mouse v0.4.0 (/home/ranger/crostini/lan-mouse)` Caused by: failed to load source for dependency `reis` Caused by: Unable to update https://github.com/ids1024/reis#a12f7e41 Caused by: failed to fetch into: /home/ranger/shuttle/x86/../rust/x86_64-unknown-linux-gnu/cargo/git/db/reis-ad85acfe9d586b15 Caused by: failed to mmap. Could not write data: Invalid argument; class=Os (2) ```
Author
Owner

@feschber commented on GitHub (Dec 28, 2023):

ChromeOS would need to support either

And either

Neither of which is very likely to happen anytime soon.

The error you are seeing is because xdg-output
is currently used to detect the dimensions of monitors attached to a PC. I can fallback to wl-output which must be supported by any wayland compositor.

That would lead to the next error though, which is that wlr-layer-shell is not supported.
For that I could craft another fallback to a simple xdg-toplevel (normal application window) that you would move the mouse into to control another PC. (not very elegant but a somewhat useful fallback).

So in short the options to get input capture working are:

  • Implement wl-output fallback for xdg-output
  • Implement xdg-toplevel fallback for wlr-layershell

For input emulation I have less hope other than chromeos supporting either xdg remote desktop or Libei at some point.

The other error you are seeing is very peculiar and seems to be an issue with cargo on chromeos.
You could comment out the "reis" dependency from Cargo.toml to work around it (its only needed for libei, which is not supported anyway).

With that the GUI should now launch as well.

<!-- gh-comment-id:1871216983 --> @feschber commented on GitHub (Dec 28, 2023): ChromeOS would need to support either - [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), which is very unlikely - The [Remote Desktop Portal](https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.RemoteDesktop.xml), which is probably the most likely to get implemented at some point. - [Libei](https://gitlab.freedesktop.org/libinput/libei) Support. For input emulation - or the X Test extension for Xorg, which is also very unlikely because chromeos probably uses xwayland. And either - Libei - or [wlr-layer-shell](https://wayland.app/protocols/wlr-layer-shell-unstable-v1) for input capture Neither of which is very likely to happen anytime soon. The error you are seeing is because [xdg-output](https://wayland.app/protocols/xdg-output-unstable-v1) is currently used to detect the dimensions of monitors attached to a PC. I can fallback to wl-output which must be supported by any wayland compositor. That would lead to the next error though, which is that wlr-layer-shell is not supported. For that I could craft another fallback to a simple xdg-toplevel (normal application window) that you would move the mouse into to control another PC. (not very elegant but a somewhat useful fallback). So in short the options to get input capture working are: - [ ] Implement wl-output fallback for xdg-output - [ ] Implement xdg-toplevel fallback for wlr-layershell For input emulation I have less hope other than chromeos supporting either xdg remote desktop or Libei at some point. The other error you are seeing is very peculiar and seems to be an issue with cargo on chromeos. You could comment out the "reis" dependency from `Cargo.toml` to work around it (its only needed for libei, which is not supported anyway). With that the GUI should now launch as well.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#8
No description provided.