Skip to content

Conversation

@ctrlaltf24
Copy link
Contributor

@ctrlaltf24 ctrlaltf24 commented Apr 13, 2025

Open questions:

  • snap - probably just needs a new .desktop file
  • flatpak - maybe it's own desktop file

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 (libronixdls:keylink|ref=[en]bible:Ps150.6)
  • 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:

Fixes: #264 #400

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: FaithLife-Community#264 FaithLife-Community#400
@ctrlaltf24 ctrlaltf24 requested review from n8marti and thw26 April 13, 2025 03:57
@n8marti
Copy link
Collaborator

n8marti commented May 12, 2025

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
Copy link
Collaborator

n8marti commented May 12, 2025

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.

@thw26
Copy link
Collaborator

thw26 commented Jul 28, 2025

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…

filename=url_handler_desktop_filename,
app_name=f"{flproduct} URL Handler",
comment="Handles logos4: and libronixdls: URL Schemes",
exec_cmd=f"{oudedetai_executable} --wine '{app.conf.logos_exe_windows_path}' '%u'",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing shows the backslashes in the app.conf.logos_exe_window_path need an extra backslash, otherwise the command string is broken on running xdg-open.

For some unknown reason spawning the mime type from within firefox with using the appimage fails to actually launch logos,
however if the aforementioned mime type launches a terminal which then spawns logos, the window opens
fix works for unknown reasons, perhaps due to permissions in the process tree relating to fuse mounting the appimage.

Thankfully the terminal window today only shows up for a second, and then closes.
slightly sub-optimal UX, however acceptable considering it actual functions on all configurations

Tested:
- clean install (using default appimage) on Debian 12 with Firefox ESR 128.13.0
- logged in
- the "Download your Logos Library" dialog appeared

- on the same system as above, uninstalled logos, pkilled wine and Logos, then re-installed using system wine 10.13 staging on Debian 12 with Firefox ESR 128.13.0
- logged in
- the "Download your Logos Library" dialog appeared
@ctrlaltf24 ctrlaltf24 requested a review from thw26 August 23, 2025 23:47
@ctrlaltf24 ctrlaltf24 marked this pull request as ready for review August 23, 2025 23:47
@thw26 thw26 merged commit 3d84868 into FaithLife-Community:main Aug 24, 2025
1 check passed
@ctrlaltf24 ctrlaltf24 deleted the feat-support-logos4-and-libronixdls-schemes branch August 24, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for libronixdls (and logos4) urls

3 participants