Linux
For Linux users, create a desktop application in ~/.local/share/applications/org-protocol.desktop:
bash
[Desktop Entry]
Name=Org-Protocol
Exec=emacsclient %u
Icon=emacs-icon
Type=Application
Terminal=false
MimeType=x-scheme-handler/org-protocolAssociate org-protocol:// links with the desktop application by running in your shell:
bash
xdg-mime default org-protocol.desktop x-scheme-handler/org-protocolTo disable the “confirm” prompt in Chrome, you can also make Chrome show a checkbox to tick, so that the Org-Protocol Client app will be used without confirmation. To do this, run in a shell:
bash
sudo mkdir -p /etc/opt/chrome/policies/managed/
sudo tee /etc/opt/chrome/policies/managed/external_protocol_dialog.json >/dev/null <<'EOF'
{
"ExternalProtocolDialogShowAlwaysOpenCheckbox": true
}
EOF
sudo chmod 644 /etc/opt/chrome/policies/managed/external_protocol_dialog.jsonand then restart Chrome (for example, by navigating to <chrome://restart>) to make the new policy take effect.
See here for more info on the /etc/opt/chrome/policies/managed directory and here for information on the ExternalProtocolDialogShowAlwaysOpenCheckbox policy.