this post was submitted on 20 Oct 2023
49 points (74.7% liked)

Linux

47984 readers
1208 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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 
  • Are you using Flatpaks?
  • Are you trusting Flathub?
  • Do you bother about the sandboxing and security?
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 18 points 1 year ago* (last edited 1 year ago) (13 children)

Are you using Flatpaks?

Yes, makes Debian desktop perfect. Rock solid base system, all desktop apps updated to the latest and greatest without pollution.

Are you trusting Flathub?

Yes BUT... there should be a way to have / manage / install Flatpaks offline like AppImages and/or easy and officially supported ways of archiving the repository into something useful and easy to use.

Related: https://github.com/flatpak/flatpak/issues/4874

Do you bother about the sandboxing and security?

Too much security already: https://github.com/flathub/org.keepassxc.KeePassXC/issues/29#issuecomment-559476300 A password manger can't community with a Browser as it is. This makes both useless and kills one of the best use cases for Flatpak.

[–] [email protected] 4 points 1 year ago (5 children)

FWIW I figured out how to get a password manager (Browserpass, not KeePassXC) to communicate with flatpak Chrome if you want some advice on how to get it to work.

But yes, it was way more difficult than it should have been (which is "should work out of the box, just like a regular package"). So if you're just listing some of the shortcomings of flatpak, never mind.

[–] [email protected] 2 points 1 year ago (3 children)
[–] [email protected] 5 points 1 year ago (1 children)

OK, so I looked though my browser history, and here are some relevant pages I found:

I don't remember how much I used each one, but eventually I pieced together enough information information to get the Browserpass extension working in the Google Chrome flatpak. But three of those links are KeePassXC, which should be useful for adapting this for your use.

The main file that was having problems was the Browserpass Native Messaging Hosts file in my config directory for the Chrome flatpak, ~/.var/app/com.google.Chrome/config/google-chrome/NativeMessagingHosts/com.github.browserpass.native.json. Originally it was a symlink to a file at /usr/lib/browserpass/hosts/chromium/com.github.browserpass.native.json:

{
    "name": "com.github.browserpass.native",
    "description": "Browserpass native component for the Chromium extension",
    "path": "/usr/bin/browserpass-linux64",
    "type": "stdio",
    "allowed_origins": [
        "chrome-extension://naepdomgkenhinolocfifgehidddafch/"
    ]
}

The call to /usr/bin/browserpass-linux64 did not see to work for me, so I ended up making a copy of the file in the NativeMessagingHosts directory and modified it to point to a script in my home mount:

wile_e8 NativeMessagingHosts $ diff com.github.browserpass.native.json.orig com.github.browserpass.native.json
4c4
<     "path": "/usr/bin/browserpass-linux64",
***
>     "path": "/home/wile_e8/.config/browserpass/browserpass.sh",

I don't remember why I picked to do it inside the ~/.config directory, but it worked so I left it. And here is the script I put at ~/.config/browerpass/browserpass.sh:

#!/bin/sh
cd ~
/usr/bin/flatpak-spawn --host /usr/bin/browserpass-linux64 2>/tmp/error.log

I don't remember how I came up with that script, it must be somewhere in the four links at the top.

Finally, I needed to use Flatseal to allow access to the script. In the Google Chrome settings, under "Filesystem->Other files", I added an entry saying ~/.config/browserpass:ro. Also modified from the default in Flatseal, I have "Filesystem->All user files" enabled, along with "Socket->D-Bus session bus" and "Socket->D-Bus system bus". I don't know how necessary the last three are, but I'm not messing with it now that I have it working.

So, that's what I did to get the Browserpass extension working in the Google Chrome flatpak. You'll have to modify some things to get it working for KeePassXC, or for Firefox. But that general pattern should work.

[–] [email protected] 2 points 1 year ago

Hmm I kind of tried that route before but haven't gone so far. I'll check it asap. Thanks!

load more comments (1 replies)
load more comments (2 replies)
load more comments (9 replies)