this post was submitted on 06 Feb 2024
22 points (95.8% liked)
Linux
48237 readers
598 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Thanks for posting about this! I never thought to try this as an Akregator user, but it's a great idea... I spent the past day getting this to work since I also use the Flatpaks; hope it helps.
As suggested by @[email protected], one solution is to define a custom protocol where the URL gets passed to a script that opens Firefox Reader with the URL; here's what I've done:
xdg-open
since that should be available to the Flatpak. I usedfirefox-reader
as the protocol, so I putxdg-open firefox-reader://%u
as the custom command (so a command Akregator would run might look likexdg-open firefox-reader://https://example.com
).~/.local/share/applications
is the standard place to put these, as far as I'm aware. Since the custom protocol needs to be removed from the URL, I wrote a script (also below) to do this and then call Firefox withabout:reader?url=
prefixed. The script can be anywhere in$PATH
.xdg-mime default org.mozilla.firefox.reader.desktop x-scheme-handler/firefox-reader
(org.mozilla.firefox.reader.desktop
is the name of my desktop entry file).update-desktop-database ~/.local/share/applications
soxdg-open
would find the "Firefox Reader" desktop entry.My Firefox Reader desktop entry
open-firefox-reader.sh script
If you have any other trouble or want to find more information about this since the desktop entry could probably be tweaked, here are the sources of note I used to figure this out (If I forgot a step or two writing this, they should also be present somewhere in there):
Thank you for the very thorough reply! For god knows what reason I get this error:
error: app/org.mozilla.firefox/x86_64/stable not installed
when running the xdg-open firefox-reader command, yet manually runningflatpak run --user org.mozilla.firefox about:reader?url=https://example.com
works just fine. I'll have to troubleshoot it when I have a bit more time ;pThanks again for your very thorough write up and the linked articles. Have a good day :)
Update: It seems like on my system, the
--user
flag was the issue, removing it made the script function. I am using Fedora Kinoite (Immutable version of KDE Plasma), so perhaps it is just a difference in how flatpak is configured between distros? I'll have to read into it more later.Cheers, glad to hear you got it working. I don't think there's any problem on your end; all my flatpaks are user-installed as a Guix System user, so it didn't cross my mind that a habitually-placed
--user
flag would not work if something was installed system-wide!