Open justraven opened 2 years ago
Hello, maybe this weekend I will try to make the integration work, hopefully it will work without major problems, I will communicate the progress through this issue.
Hello again, could you install flatseal(in case you don't have it installed yet) and enable permission so that FDM can read the host? I think that way I could read the browsers(at least the native ones) it seems that there is no way to read the browsers installed with flatpak. A similar case happens with password manager programs and their integrations. @justraven
I've install flatseal and give the permission to the program but still can't read the browser
I have 2 browsers installed with native pkg (deb) : firefox and vivaldi
It seems that the application obtains the information from the browsers in another way, this is complicated, considering that FDM is a proprietary application
https://github.com/flathub/org.freedownloadmanager.Manager/blob/master/README.md
hopefully one day the situation will change.
I hope so
Alright, I've been testing out the flatpak with natively installed browser. So far, I've managed to make it work with Firefox but not Brave (though I recall Brave having some weird config with its native host so I'll try it later with Edge and Chromium).
What I did is that I went to $HOME/.mozilla/native-messaging-hosts/
and edited the path in the org.freedownloadmanager.fdm5.cnh.json
file to point to "\/var\/lib\/flatpak\/app\/org.freedownloadmanager.Manager\/current\/active\/files\/extra\/opt\/freedownloadmanager\/wenativehost"
.
At first, I saw that the extension DID detect the nativehost BUT when I tried to download something, it ONLY spawned an fdm tray icon but NOT the download manager window. However, after trying out the AppImage version I know that this is a Wayland issue and when I closed the tray icon, the handover process to the browser native downloader operated successfully as normally expected. Therefore, I tried it again with env WAYLAND_DISPLAY= firefox
to force Firefox on x11, and the fdm window appeared.
Now, the caveats:
qt.conf
file?). Though if all you want is just faster downloads, you can probably just choose to always accept so that you don't need to deal with the GUI window.If we want to, we could probably add the command needed to automaticall rewrite the path on the README, provide files for both firefox and chromium for people to just overwrite the normal one with, or just write out the location of the file and what needed to be overwritten. But I don't think it's worth it, at least until fdm adopts Wayland- still, if anyone wants to pass this message to the main devs so that they can properly support flatpak, you can do so.
Honestly, I think it's better to just use the AppImage version, now that I know that the Brave issue has nothing to do with the AppImage version (which has the wenativehost in a hidden mounted fusefs in /tmp
). I'll try to work out the Brave and Chromium files later, but it's such a headache - by all rights it should just pull in from $HOME/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts
. Maybe it pulls from Chromium's xdg-config-home folder still?
I can confirm that it work on X11 using firefox (deb). Thanks @bayazidbh !
A little bit of testing, it does seem like it works with Brave with its native host config file at $HOME/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/
by pointing it to \/var\/lib\/flatpak\/app\/org.freedownloadmanager.Manager\/current\/active\/files\/bin\/wenativehost
. It's just that it seems the path sometimes gets reseted which is why I thought it doesn't work because I didn't double-check the file.
I recently saw some movement on the WebExtension support in xdg-desktop-portal so hopefully this will not be necessary anymore soon, although the x11 requirement will likely stay until FDM supports wayland.
hey could you look into this script? This is done with keepassxc to work with browser addon. I think similar can be done with FDM. Ofcourse if you have free time.
Forgive my inactivity a bit, I have been very busy in my personal life, if someone has the time and knowledge to make such a script, you can do a pr, I will take care of testing and verifying it, I am not that good with shell and right now I don't have the time to test :(
I doubt it's possible to make this program work inside a sandbox when it comes to browser integration... Meanwhile I made a script to build an AppImage for it just so everyone could use that for now
@FanderWasTaken This has been done in https://github.com/mi-g/vdhcoapp/issues/91#issuecomment-1247940392, however, I would recommend just waiting for NativeHostMessaging portal for a proper interface in Flatpak.
In the meanwhile, you can use Distrobox, Conty, and anything like them, and so long as both the browser and the app exists in the same container then they should work automatically.
Hi, thanks for bringing FDM to flatpak!. The program runs smoothly on KDE Wayland ( I used deb before and it didn’t want to launch on wayland). Unfortunately, I notice that FDM on flatpak didn’t recognize my browser at all so it couldn’t integrate with my browser. I hope you can fix this issue. Thank you! [ sorry for my bad english, english isn’t my first language ].