fix(linux): pass URLs through desktop launcher#1179
fix(linux): pass URLs through desktop launcher#1179toonvanvr wants to merge 3 commits intosurrealdb:mainfrom
Conversation
👷 Deploy request for public-surrealist pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Pull request overview
Updates Linux bundle configuration so the generated .desktop launcher forwards OAuth callback URLs to the application, fixing Linux sign-in flows for .deb (and aligning .rpm).
Changes:
- Configure Tauri Linux
debandrpmbundling to use a customdesktopTemplate. - Add a Handlebars-based
.desktoptemplate that appends%UtoExec=to forward URLs to the app.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src-tauri/tauri.conf.json |
Enables a shared .desktop template for Linux deb and rpm bundles. |
src-tauri/res/desktop-template.desktop.hbs |
Defines the .desktop template, including Exec={{exec}} %U to pass URLs through the launcher. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks for your PR!
Unfortunately we don't have the capabilities internally to test the |
Issue
Signing in to to your SurrealDB account is not possible when using the
.debinstaller.Relates to: #954
Cause
The OAuth callback URL is not passed as an argument to the
surrealistexecutable when passing it to the.desktoplauncher.Solution
Alter the generated
.desktopfile by using a handlebars template to pass URLs.Choices made
surrealistcommand in the launcher in another way.%U(multiple URLs) instead of%u(single URL) as the macOS seems to support multiple URLs too.surrealist/src-tauri/src/main.rs
Line 128 in 78f7c43
%1means it picks only the first URL.surrealist/src-tauri/res/installer.nsi
Line 561 in 78f7c43
MimeTypemanually as it seemed missing in the variables provided by Tauri in their official documentationNotes
Verification
%Uflag works when manually editing the.desktopfile after installing the current official release3.7.4.debbuild creates the.desktopfile correctly in/usr/share/applications/Surrealist.desktopThe.debbuild works locally.rpmbuild worksCaution
I was not able to get the
.debversion to run correctly after the build due to my local setup, nor did I test therpmversion as I'm running Ubuntu.AppImage didn't support a flag like this, and I'm not sure whether that's impacted.
⇒ Please verify these cases before merging
References
bundle.linux.deb.desktopTemplate(Tauri Documentation)bundle.linux.rpm.desktopTemplate(Tauri Documentation)Exec=variables (Desktop Entry Specification)