This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Plasma Browser Integration fail

Tags: None
(comma "," separated)
mxprasinos
Registered Member
Posts
2
Karma
0

Plasma Browser Integration fail

Fri Mar 24, 2023 8:46 am
So I have clean installed KDE neon and I have a weird problem. I added in the pre-installed Firefox browser the plasma-browser-integration extension and it doesn't work. I get the message "Failed to connect to the native host". I checked if it was installed and the package 'plasma-browser-integration' is there. Why Firefox can't locate it? I asked at the firefox help forum and they stated that it isn't a browser problem. Please help!
I use: KDE neon 5.27
KDE plasma version: 5.27.3
Firefox edition 111.0, Mozilla Firefox for Ubuntu
Thanks in advance!
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS

Re: Plasma Browser Integration fail

Fri Mar 24, 2023 1:12 pm
On some systems, it seems that the apparmor profile for FF causes some extensions to not be able to connect to a native host.

This can be remedied, or disabled, rather, like so:
Code: Select all
sudo ln -s /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.bin.firefox


SOURCE
I assume that the Mozillateam PPA folks may need to be poked on the topic as the profile comes from their Firefox packaging, but not sure where to do so.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
mxprasinos
Registered Member
Posts
2
Karma
0

Re: Plasma Browser Integration fail

Sat Mar 25, 2023 11:25 am
YESSS!!!! Thanks mate it worked like a charm! You are the BEST! You got no ideas how long i've been trying and you solve it in a single reply! Awesome!!
paulburden
Registered Member
Posts
2
Karma
0

Re: Plasma Browser Integration fail

Tue Mar 28, 2023 11:11 am
Hi
I have a similar issue but this fix doesn't work for me.
I'm running Kubuntu 22.10
Firefox 111.0.1 Mozzilla Snap for Ubuntu - cannonical-002- 1.0
Latest plasma-browser-integration
Kernel 5-19.0-38-generic

When I run these two commands I get :-
ln: failed to create symbolic link '/etc/apparmor.d/disable/usr.bin.firefox': File exists
and :-
apparmor_parser: Unable to remove "firefox". Profile doesn't exist

What am I doing wrong or how can I create a firefox profile please?
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS

Re: Plasma Browser Integration fail

Tue Mar 28, 2023 2:18 pm
paulburden wrote:Hi
I have a similar issue but this fix doesn't work for me.
I'm running Kubuntu 22.10
Firefox 111.0.1 Mozzilla Snap for Ubuntu - cannonical-002- 1.0
Latest plasma-browser-integration
Kernel 5-19.0-38-generic

When I run these two commands I get :-
ln: failed to create symbolic link '/etc/apparmor.d/disable/usr.bin.firefox': File exists
and :-
apparmor_parser: Unable to remove "firefox". Profile doesn't exist

What am I doing wrong or how can I create a firefox profile please?


You are using the Firefox snap, which had this issue fixed some time ago now, so you have a different issue than the one here from the PPA deb packaging neon uses for FF. You will need to pester the snap folk, I imagine.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
jmacleod
Registered Member
Posts
50
Karma
0

Re: Plasma Browser Integration fail

Tue Mar 28, 2023 6:40 pm
I have the same problem as the previous writer getting the same replies when running those commands.

The problem is that I have no snap or flatpak apps on my system.
I dont use Discover but it shows 'Firefox and Thunderbird Archive' ( distributed by KDE Neon ) as installed.

The upgrade to 5.27 seems to have brought several problems with it after years of faultless improvements.
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS

Re: Plasma Browser Integration fail

Tue Mar 28, 2023 8:26 pm
jmacleod wrote:I have the same problem as the previous writer getting the same replies when running those commands.

The problem is that I have no snap or flatpak apps on my system.
I dont use Discover but it shows 'Firefox and Thunderbird Archive' ( distributed by KDE Neon ) as installed.

The upgrade to 5.27 seems to have brought several problems with it after years of faultless improvements.


It could be an issues with your combo of extensions, or some other issue with one's FF profile?
I am on neon as well, and have no issues with Plasma Browser Integration, after following those steps I listed above. This disables the apparmor profile, which is what was causing the problem.



No issues for quite some time now, either.

If you want to try re-enabling it for some reason, you need to do the opposite:

Code: Select all
sudo rm /etc/apparmor.d/disable/usr.bin.firefox
sudo apparmor_parser -r /etc/apparmor.d/usr.bin.firefox


For me, re-enabling the apparmor profile re-breaks the plasma-browser-extension, as well as another one I use that also uses a native host integration.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
User avatar
colomar
Registered Member
Posts
947
Karma
2
OS

Re: Plasma Browser Integration fail

Mon Apr 10, 2023 12:54 pm
Isn't there a way to fix the profile without disabling AppArmor for Firefox completely?
With the browser being the most common route into a machine for hackers, disabling AppArmor for it sounds pretty dangerous...
User avatar
thunder422
Registered Member
Posts
81
Karma
1
OS

Re: Plasma Browser Integration fail

Tue Apr 11, 2023 4:55 pm
I found another solution. In the application launcher menu, right-click on Firefox, click Edit Application..., click on the Application tab and add this to the Environment Variables field:
Code: Select all
GTK_USE_PORTAL=1
Note that after editing, the icon in the Favorites will no longer work to start Firefox, so this icon needs to be deleted from Favorites, and re-added from where it is on the menu (in other words, under Internet).

This procedure may work for other GTK applications that use the GTK file dialogs, for example I did it for GVim, which as installed used the GTK file dialogs. After this procedure, it now uses the KDE file dialogs.


Currently running KDE Neon 5.22.5 and 5.19.4 (with Windows 10 in a VM); migrated from Linux Mint 17.3
User avatar
colomar
Registered Member
Posts
947
Karma
2
OS

Re: Plasma Browser Integration fail

Wed Apr 12, 2023 6:52 pm
Thanks!
This fixes the file dialog. That's not the only feature of the Plasma Browser Integration add-on, though.
So I'd still hope for a solution that makes it work without completely disabling App Armor for Firefox


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]