Writing to clipboard in a command line flatpak.
Ondřej Míchal
harrymichal at seznam.cz
Mon Feb 8 19:31:58 UTC 2021
Hi Emil,
I think you need to adjust your finish-args. Try to explicitly add
--socket=wayland.
Cheers
Ondra
On 07/02/2021 1:26 pm, Emil Johansson wrote:
> Hey,
>
> I am trying to make a flatpak version of my command line application
> https://github.com/emiljoha/mpw <https://github.com/emiljoha/mpw>. I
> have gotten most of the dependencies in order but I have not been able
> to figure out how to write to the clipboard.
>
> I have managed to bundle wl-clipboard but it says it cannot connect to
> a wayland server. Looking in the source code of wl-clipboard it gets
> NULL back from wl_display_connect. From the documentation I can find
> https://manpages.debian.org/experimental/libwayland-doc/wl_display_connect.3.en.html
> <https://manpages.debian.org/experimental/libwayland-doc/wl_display_connect.3.en.html>
>
>
> > *wl_display_connect* connects to a Wayland socket that was
> previously opened by a Wayland server. The server socket must be
> placed in *XDG_RUNTIME_DIR* when *WAYLAND_DISPLAY* (or /name/, see
> below) is a simple name, for this function to find it. The server
> socket is also allowed to exist at an arbitrary path
>
> wl-copy.c call the function with NULL as the name.
>
> I have in my manifest.
> finish-args:
>
> --socket=fallback-x11
>
> --share=ipc
>
> More details and the code of my attempt can be found in the PR
> https://github.com/emiljoha/mpw/pull/21
> <https://github.com/emiljoha/mpw/pull/21>
>
> Thanks
> Emil
>
> _______________________________________________
> Flatpak mailing list
> Flatpak at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/flatpak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20210208/fdeeabd1/attachment.htm>
More information about the Flatpak
mailing list