KDE integration with (regular) Firefox

So due to the 'soft retirement' of firefox-kde-opensuse as seen here:
Firefox update didn't solve disabled add-ons!
The current status of firefox-kde-opensuse

I would like to offer a way to get better 'save as' windows and more in Firefox while using Plasma.

First you must have these packages:

xdg-desktop-portal
xdg-desktop-portal-kde

Then to test run using the GTK_USE_PORTAL=1 environment variable like so:

GTK_USE_PORTAL=1 firefox

If you are happy you could edit the .desktop file. But this might be overridden by subsequent updates.
So instead we will copy the .desktop file to our home directory and modify that.

Copy the original:

cp /usr/share/applications/firefox.desktop ~/.local/share/applications/

Modify the local version (use any editor you like):

micro ~/.local/share/applications/firefox.desktop

Edit on the Exec lines this way:

Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox %u"
Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --new-window %u"
Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 /usr/lib/firefox/firefox --private-window %u"

Save and enjoy your firefox/plasma integration

Notes and Extras

For further KDE integration have a look at the firefox addon
https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/
(requires package plasma-browser-integration)

If you absolutely need appmenu patches there is firefox-appmenu from the AUR
https://aur.archlinux.org/packages/firefox-appmenu/

5 Likes

There's more to the KDE/Plasma integration in firefox-kde-opensuse than just the XDG stuff, though. This version of Firefox also exports its menu over dbus, so that it can be shown in Plasma's global menu applet.

07_-Manjaro_with_KDE_Plasma_5-_Firefox_with_openSUSE_patches

2 Likes

True.
But I dont use that applet and even if firefox-kde-opensuse will continue to be available in some form (it may or may not... but very likely to be gone from repos) it still hasnt yet been updated to fix addons.

By all means, use what you like.

This is just one of many options.

By the by - have you tried adding the Firefox Plasma integration addon ? Maybe it would give you some of what you want ...

2 Likes

Are you sure about that?
I've just tried firefox-kde-opensuse 66.0.4 with a new blank profile, and addons do work.

Well .. I was sure about what was in the repos/aur :stuck_out_tongue:

Then of course you're right, AUR is still at .3 :wink:

I've just installed it ─ thank you for the link. :slight_smile:

I am using Chromium as my main browser, though. :slight_smile:

I also added up top something that should fix the appmenu thing .. care to give it a try ?

Well, I'm still running the openSUSE version here, and I haven't been seeing any update notifications from Octopi anymore in almost a week, so if it ain't broke, then I don't wanna fix it. :stuck_out_tongue:

Ohps. Sure thing.
I'll just wait for someone to stop by and yell about it working or not working :innocent:

Hmmm, the link you posted higher up with the Plasma integration extension is throwing up an error here. :frowning:

both work here .. (but are https) ??...
[and just recompared from search]

Isn't this a patched version of firefox? If you are going to build firefox from the aur, is there an advantage to this over firefox-kde-opensuse?

Its actually the firefox from repos with the patch added if you absolutely need the appmenu stuff.

I dont, but someone mentioned it - and depending on how you feel about the licensing/repos/stuff over on the other thread, it may end up being a more viable solution this way.

That includes the unity menubar patch, which is also included in firefox-kde-opensuse.

Yes, I should have chosen my words better. :slight_smile: The link works but that extension throws up an error in my Firefox. Something about not being able to connect.

You need to have the plasma-browser-integration package installed for this to work.

1 Like

Ah yes... I thought I had that installed, but apparently I hadn't. Thanks for the tip. :+1:

Made the change, but now Thunderbird keeps on telling me that it's not the default browser every time I start it for the first time?

By the way, is this "GTK_USE_Portal" variable also supposed to work with Thunderbird. It's less of an issue for me there but just curious.
I tried but couldn't get it to work...

1 Like

By the way, is this "GTK_USE_Portal" variable also supposed to work with Thunderbird.

Not yet. It seems we have to wait for Thunderbird 68: https://bugzilla.mozilla.org/show_bug.cgi?id=1490186#c19

2 Likes

Forum kindly sponsored by