Subject: Re: bug#76120: [PATCH] Expose the native sharing dialog (macOS)

From: Björn Bidar <[email-masked]>
Date: Mon, 10 Feb 2025 02:17:42 +0200

Stefan Kangas <[email-masked]> writes:

>>> Would you or anyone else be interested in implementing this for
>>> GNU/Linux as well?  I don't think we need perfect coverage of
>>> all
>>> desktop environments, but it would be useful to support it on
>>> one or more
>>> popular ones (for example Gnome or KDE).
>>
>> Skills-wise, I wouldn't be the best candidate to make the
>> Linux-related changes. I could try reaching out to Carl Lieberman,
>> author of https://github.com/carldotac/kdeconnect.el, to see if
>> they'd be inclined to contribute their package upstream.
>>
>>> This would also be a good opportunity to generalize the feature,
>>> so that
>>> instead of having `ns-share`, we would have a command named
>>> `share-file`
>>> or something like that.
>>
>> Without a Linux partner to help with the counter changes, I'm less
>> likely to take on the additional scope.
>>
>> I could also reach out to emacs-devel if you reckon it's
>> appropriate to scout Linux support.
>
> Asking Carl Lieberman might be a useful step.  Asking on emacs-devel
> would also be useful, to see if other people have any comments.

kdeconnect.el doesn't implement any dialog to "share" a file but only
invokes KDEconnect CLI to share a file.

>From what I know there's no direct share "Linux" (Linux in quotes
because the definition what Linux is isn't exact) or XDG API for sharing.

KDE has the Purpose API[1] as a generic API for interacting with
applications to e.g. provide a share API or open something in an
application. For example KDE Connect has a provider for this API which
allows to share with it similarly to it's CLI application.

How sharing is done in KDE can been here.[2]

GNOME doesn't have a Sharing API but there's an issue open about this
topic.[3]

Links:
[1] https://api.kde.org/frameworks/purpose/html/dir_b0f0133c8c657e97aec4f8e0dece5ee9.html
[2] https://userbase.kde.org/Tips/Transfer_files_between_phone_and_PC_using_Wi-Fi
[3] https://gitlab.gnome.org/Teams/Design/whiteboards/-/issues/118