On 28/06/2025 03:26, Charles Choi wrote:
On Jun 27, 2025, at 7:56 AM, Max Nikulin wrote:

P.S. Has anybody tried org-protocol with Emacs installed as flatpak?

Interesting. I can imagine how sandboxed applications on both Linux and
Windows (UWP) would have restrictions on accessing emacsclient and an
Unix local domain socket, but I do not know how to test this. I would be
reluctant to make this claim on the Worg org-protocol.org page without
some vetting.

On Linux you may enter namespaces created for a sandboxed app and to inspect files available to it.

If an application allows to run arbitrary command then you may specify e.g. "emacsclient -c"

I do have a snap install of Emacs 30.1 on Ubuntu 22.04.5 LTS. After
installing the org-protocol.desktop file as instructed in the Worg org-
protocol.org page, I am able to have Org protocol working. A test case
was using the Gnome Contacts app, where I created an entry whose website
field was populated with an Org protocol store-link URL. Clicking on the
open URL button in the Gnome Contacts app successfully stored a Org link
in Emacs.

Thanks, I forgot that emacsclient may be installed as a symlink that actually runs the command inside the same sandbox as emacs, so custom URL is handled purely on the host while socket may be isolated. Only command line arguments are passed.

I tried Firefox snap, perhaps it was Ubuntu-21.10. I hope, something has been improved since that time. I was curious if I can use native messaging helper for my browser extension. Out of the box, it was impossible and I found complains related to hardware authentication tokens inaccessible from snap. I did not try to add more permissions to the snap package.

I recall, it was possible to use file picker to choose /usr/bin/emacsclent to handle "org-protocol:" scheme, but this way it did not work. Perhaps I have in my notes whether I tried to configure proper .desktop file during that experiments.


Reply via email to