Links don't open in the OS default browser on Linux; add link-browser setting #14

Closed
opened 2026-10-04 20:53:13 -04:00 by adam · 1 comment
Owner

Moved from adam/sunburn#97.

Report

On Linux with Firefox as the default browser, links clicked in Sunburn open in Chromium.

Reporter: Devlince@chat.galactica.host
Desktop: sunburn-desktop 1.4.7 (Electron 41.1.0, Chrome 146), web 2026.10.04.10

Cause

Links go main.js → shell.openExternal → xdg-open, which resolves to Chromium on the reporter's machine.

Fix

The web side shipped in adam/sunburn#95: Settings → Links shows a browser picker when the shell exposes chooseLinkBrowser (typings in pwa/src/app.d.ts). The desktop side:

  • settings.js: add a linkBrowser setting
  • main.js: IPC handlers get-link-browser, choose-link-browser, reset-link-browser; open links by spawning the chosen binary, falling back to shell.openExternal
  • preload.js: expose getLinkBrowser, chooseLinkBrowser, resetLinkBrowser
  • Release as a new minor version

Open question

Ask the reporter for the output of xdg-settings get default-web-browser and xdg-mime query default x-scheme-handler/https, and whether they run the AppImage directly. If xdg already reports Firefox, the AppImage environment is likely skewing xdg-open. That would be a separate follow-up.

Moved from adam/sunburn#97. ## Report On Linux with Firefox as the default browser, links clicked in Sunburn open in Chromium. Reporter: Devlince@chat.galactica.host Desktop: sunburn-desktop 1.4.7 (Electron 41.1.0, Chrome 146), web 2026.10.04.10 ## Cause Links go main.js → shell.openExternal → xdg-open, which resolves to Chromium on the reporter's machine. ## Fix The web side shipped in adam/sunburn#95: Settings → Links shows a browser picker when the shell exposes `chooseLinkBrowser` (typings in pwa/src/app.d.ts). The desktop side: - [ ] settings.js: add a `linkBrowser` setting - [ ] main.js: IPC handlers `get-link-browser`, `choose-link-browser`, `reset-link-browser`; open links by spawning the chosen binary, falling back to shell.openExternal - [ ] preload.js: expose `getLinkBrowser`, `chooseLinkBrowser`, `resetLinkBrowser` - [ ] Release as a new minor version ## Open question Ask the reporter for the output of `xdg-settings get default-web-browser` and `xdg-mime query default x-scheme-handler/https`, and whether they run the AppImage directly. If xdg already reports Firefox, the AppImage environment is likely skewing xdg-open. That would be a separate follow-up.
Author
Owner

Fixed by #15 (#15)

Fixed by #15 (https://git.galactica.host/adam/sunburn-desktop/pulls/15)
adam 2026-10-04 20:58:56 -04:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
adam/sunburn-desktop#14
No description provided.