LogosLinuxInstaller icon indicating copy to clipboard operation
LogosLinuxInstaller copied to clipboard

feat: support logos4 and libronixdls URL schemes

Open ctrlaltf24 opened this issue 8 months ago • 2 comments

Open questions:

  • snap - probably just needs a new .desktop file
  • flatpak - maybe it's own desktop file
  • What should be done if registering fails? Fail the entire install?

Tested (debian 12 only):

  • built binary
  • copied binary into clean VM
  • installed Logos 40.1
  • Launched Logos
  • Hit "sign in" on Logos wine window
  • Browser opened a window where I was asked wo "Authorize" Logos Bible Study (I was already signed in)
  • Accepted the firefox prompt: "Allow this site to open the logos4 link with Logos URL Handler"?
  • After saying yes, Logos said "Getting ready" and showed first run dialog as it did in 40.0 and below after logging in.
  • After resources were downloaded went to a website in firefox that has a libronixdls URL (https://house.daviddgtnt.xyz/) and clicked the link
  • Accepted the firefox prompt: "Allow this site to open the libronixdls link with Logos URL Handler"?
  • Logos opened Ps 150:6 (which the link showed)!

Testing needed:

  • SteamOS
  • Manjaro
  • Alpine (already verified package name online)
  • Fedora (already verified package name online)
  • Archlinux (already verified package name online)

Fixes: #264 #400

ctrlaltf24 avatar Apr 13 '25 03:04 ctrlaltf24

It looks like snap support for this could be tricky (i.e. maybe not possible): https://forum.snapcraft.io/t/allow-snaps-to-register-new-mime-types/6467 But I don't yet fully understand all the steps. Are we solving 1 problem or 2 here? Specifically, are these the same or two separate things:

  1. Logos confirming user login (presumably redirecting to a .logos4 URL in the browser, which then opens Logos if that URL scheme has been registered at the system level)
  2. Logos being opened when the user clicks on a .libronixdls URL in the browser.

It seems like they're the same programming problem, but just with two different MIME Types, right? In both cases they rely on the Ou Dedetai installer to register the relevant MIME Type at the system level so that when the URL is activated in the browser it knows to redirect to the app, right?

n8marti avatar May 12 '25 07:05 n8marti

After reading some more about this and re-examining this PR, I'm now thinking this will be doable in the snap package. I don't think I see anything that involves registering a new MIME type at a system level, only doing so at the user level. And it looks like the command xdg-mime just adds a line to the relevant mimetypes.list file at the user level, which I think could be done no problem in the confined snap environment.

n8marti avatar May 12 '25 13:05 n8marti

Test on Manjaro. In general this works, but I had to click the extra buttons to return to Logos after the install and was not automatically redirected. Otherwise everything went well.


Test 2:

I deleted .local/share/applications/oudedetai.desktop but no change. I had to hit "click here" three times then tab focus to Logos.


I cannot test the URL handler in the browser. But this shouldn't prevent the browser→login panel…

thw26 avatar Jul 28 '25 22:07 thw26