mahkoh / jay

A Wayland Compositor
GNU General Public License v3.0
207 stars 10 forks source link

wl-copy completely hangs #207

Closed BKSalman closed 1 month ago

BKSalman commented 1 month ago

I haven't found any issue mentioning this, so it might be a "works on my machine" kinda thing.

but when I use wl-copy or wl-paste it completely hangs in the terminal and doesn't do anything.

I'm using jay 1.2.0 from the nixpkgs repository

what could be the issue?

mahkoh commented 1 month ago

Try jay run-privileged -- wl-copy.

BKSalman commented 1 month ago

same thing :thinking:

mahkoh commented 1 month ago

Explain in more detail what you're doing.

BKSalman commented 1 month ago

tbh I don't know what details I need to provide to help diagnose this issue.

but basically I can copy from the browser for example just fine, but when running wl-copy in the terminal and it just hangs and does nothing.

I have used the WAYLAND_DEBUG environment variable to maybe get a hint on what is going on, but I don't understand what it's saying

└─> WAYLAND_DEBUG=1 wl-copy hello
[2199737.414]  -> wl_display@1.get_registry(new id wl_registry@2)
[2199737.426]  -> wl_display@1.sync(new id wl_callback@3)
[2199738.731] wl_display@1.delete_id(3)
[2199738.737] wl_registry@2.global(34, "xdg_wm_dialog_v1", 1)
[2199738.741] wl_registry@2.global(27, "xdg_toplevel_drag_manager_v1", 1)
[2199738.744] wl_registry@2.global(16, "wp_fractional_scale_manager_v1", 1)
[2199738.746] wl_registry@2.global(45, "zwp_linux_dmabuf_v1", 5)
[2199738.749] wl_registry@2.global(1, "wl_compositor", 6)
[2199738.752]  -> wl_registry@2.bind(1, "wl_compositor", 2, new id [unknown]@4)
[2199738.756] wl_registry@2.global(7, "org_kde_kwin_server_decoration_manager", 1)
[2199738.758] wl_registry@2.global(17, "zwp_pointer_constraints_v1", 1)
[2199738.761] wl_registry@2.global(5, "wl_data_device_manager", 3)
[2199738.763]  -> wl_registry@2.bind(5, "wl_data_device_manager", 1, new id [unknown]@5)
[2199738.766] wl_registry@2.global(6, "zxdg_decoration_manager_v1", 1)
[2199738.769] wl_registry@2.global(31, "zwp_input_method_manager_v2", 1)
[2199738.771] wl_registry@2.global(19, "wp_tearing_control_manager_v1", 1)
[2199738.774] wl_registry@2.global(37, "zwp_tablet_manager_v2", 1)
[2199738.776] wl_registry@2.global(13, "zwp_relative_pointer_manager_v1", 1)
[2199738.779] wl_registry@2.global(9, "zwlr_layer_shell_v1", 4)
[2199738.781] wl_registry@2.global(2, "wl_shm", 2)
[2199738.784]  -> wl_registry@2.bind(2, "wl_shm", 1, new id [unknown]@6)
[2199738.788] wl_registry@2.global(15, "wp_viewporter", 1)
[2199738.793] wl_registry@2.global(8, "zwp_primary_selection_device_manager_v1", 1)
[2199738.798]  -> wl_registry@2.bind(8, "zwp_primary_selection_device_manager_v1", 1, new id [unknown]@7)
[2199738.804] wl_registry@2.global(25, "zwp_idle_inhibit_manager_v1", 1)
[2199738.809] wl_registry@2.global(33, "wp_security_context_manager_v1", 1)
[2199738.813] wl_registry@2.global(3, "wl_subcompositor", 1)
[2199738.818] wl_registry@2.global(32, "zwp_text_input_manager_v3", 1)
[2199738.821] wl_registry@2.global(44, "wl_drm", 2)
[2199738.824] wl_registry@2.global(39, "wp_presentation", 1)
[2199738.826] wl_registry@2.global(22, "wp_content_type_manager_v1", 1)
[2199738.829] wl_registry@2.global(20, "wp_single_pixel_buffer_manager_v1", 1)
[2199738.831] wl_registry@2.global(10, "zxdg_output_manager_v1", 3)
[2199738.834] wl_registry@2.global(23, "xdg_activation_v1", 1)
[2199738.837]  -> wl_registry@2.bind(23, "xdg_activation_v1", 1, new id [unknown]@8)
[2199738.840] wl_registry@2.global(29, "wp_alpha_modifier_v1", 1)
[2199738.842] wl_registry@2.global(21, "wp_cursor_shape_manager_v1", 1)
[2199738.846] wl_registry@2.global(4, "xdg_wm_base", 6)
[2199738.851]  -> wl_registry@2.bind(4, "xdg_wm_base", 1, new id [unknown]@9)
[2199738.855] wl_registry@2.global(36, "zwp_pointer_gestures_v1", 3)
[2199738.861] wl_registry@2.global(43, "wp_drm_lease_device_v1", 1)
[2199738.866] wl_registry@2.global(40, "wl_seat", 9)
[2199738.871]  -> wl_registry@2.bind(40, "wl_seat", 2, new id [unknown]@10)
[2199738.878] wl_registry@2.global(46, "wl_output", 4)
[2199738.883] wl_registry@2.global(41, "wp_drm_lease_device_v1", 1)
[2199738.888] wl_callback@3.done(0)
[2199738.892]  -> wl_display@1.sync(new id wl_callback@3)
[2199738.959] wl_display@1.delete_id(3)
[2199738.966] wl_seat@10.capabilities(3)
[2199738.969] wl_seat@10.name("default")
[2199738.973] wl_callback@3.done(0)
[2199738.979]  -> wl_data_device_manager@5.get_data_device(new id wl_data_device@3, wl_seat@10)
[2199738.984]  -> wl_data_device_manager@5.create_data_source(new id wl_data_source@11)
[2199738.988]  -> wl_data_source@11.offer("text/plain")
[2199738.992]  -> wl_data_source@11.offer("text/plain;charset=utf-8")
[2199738.996]  -> wl_data_source@11.offer("TEXT")
[2199739.000]  -> wl_data_source@11.offer("STRING")
[2199739.004]  -> wl_data_source@11.offer("UTF8_STRING")
[2199739.009]  -> wl_seat@10.get_keyboard(new id wl_keyboard@12)

any other debugging stuff I can provide?

mahkoh commented 1 month ago

Like I said you have to use jay run-privileged -- wl-copy hello.

BKSalman commented 1 month ago

wait, what the..., jay run-privileged -- wl-paste didn't work before, but it did now!

sorry for the weird issue, not sure why it didn't work before...

BKSalman commented 1 month ago

so how do I let other apps use jay run-privileged -- wl-paste? do I need to configure them receptively, or is there a way to allow them through jay?

mahkoh commented 1 month ago

I'm using a wrapper

#!/bin/bash

jay run-privileged -- /bin/wl-paste "$@"
BKSalman commented 1 month ago

oh cool cool. thanks!