From 0704ba5e21567d483556f57316baa89615e0f086 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 6 Nov 2026 12:03:38 +0800 Subject: [PATCH] fix(home): open PDFs from sandboxed apps in Firefox Assisted-by: DeepSeek Harness (claude-opus-5-5) --- home/linux/gui/base/xdg/mime.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/home/linux/gui/base/xdg/mime.nix b/home/linux/gui/base/xdg/mime.nix index 5f325d56..6c5feae4 100644 --- a/home/linux/gui/base/xdg/mime.nix +++ b/home/linux/gui/base/xdg/mime.nix @@ -25,7 +25,7 @@ in { "application/json" = browser; - "application/pdf" = browser; + "application/pdf" = [ "org.mozilla.firefox.desktop" ]; "text/html" = browser; "text/xml" = browser; @@ -68,6 +68,12 @@ "inode/directory" = [ "yazi.desktop" ]; }; + # The portal app chooser used by sandboxed apps (e.g. Telegram) lists only these + # and the types a desktop entry declares, never the defaults above. + associations.added = { + "application/pdf" = [ "org.mozilla.firefox.desktop" ]; + }; + associations.removed = { # ...... };