Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help for plasma browser integration #2953

Closed
Neo00001 opened this issue Sep 9, 2019 · 22 comments
Closed

Need help for plasma browser integration #2953

Neo00001 opened this issue Sep 9, 2019 · 22 comments
Labels
question_old (Deprecated; use "needinfo" or "question" instead) Further information is requested

Comments

@Neo00001
Copy link
Collaborator

Neo00001 commented Sep 9, 2019

I have installed plasma integration extension for firefox(nightly) & it does work if firefox ain't firejailed. So is there a way to make it work inside firejail? Inside firejail it's showing "failed to connect to native host".

@rusty-snake rusty-snake added the question_old (Deprecated; use "needinfo" or "question" instead) Further information is requested label Sep 9, 2019
@rusty-snake
Copy link
Collaborator

rusty-snake commented Sep 9, 2019

# nodbus breaks various desktop integration features
# among other things global menus, Gnome connector, KDE connect and power management on KDE Plasma
nodbus

Try adding ignore nodbus to firefox.local.

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

It's still showing the same message. btw, I have private etc enabled in firefox-common.profile
can that be the reason?

@rusty-snake
Copy link
Collaborator

Possible, but I think that rather one more path needs to be whitelisted.

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

which one?

@rusty-snake
Copy link
Collaborator

Thats the big question. 🙄

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

I have disabled private-etc, but the problem persists.

@rusty-snake
Copy link
Collaborator

Have you enabled private-bin?

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

yea in firefox profile.

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

done... just had to add plasma-browser-integration-host in private-bin

Thanks

@rusty-snake
Copy link
Collaborator

https://github.com/KDE/plasma-browser-integration/blob/63721fad1a3b04ccf9fef4e7d86bfac359625150/org.kde.plasma.firefox_integration.json.in#L4
Try adding private-bin plasma-browser-integration-host to firefox.local.

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

can I ask another question which is not related with this issue or should I open a new one?

@rusty-snake
Copy link
Collaborator

rusty-snake commented Sep 9, 2019

If an other user has the same question it's easy to find it in a new issue.

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

ok

@rusty-snake
Copy link
Collaborator

@Neo00001

nodbus
private-bin plasma-browser-integration-host

With it works, right?

@Neo00001
Copy link
Collaborator Author

Neo00001 commented Sep 9, 2019

ignore nodbus & private-bin plasma-browser-integration-host

@Neo00001
Copy link
Collaborator Author

with xdg-dbus-proxy having some problem. basic media control works but progress of downloads in notification are doesn't work properly.
with

dbus-user filter
dbus-user.own org.mozilla.firefox.*
dbus-user.own org.mpris.MediaPlayer2.firefox.*
dbus-user.talk org.freedesktop.Notifications
ignore dbus-user none

it shows pic1. so I added dbus-user.talk org.kde.JobViewServer & now it shows pic2 along with pic1. Desired is only pic2.

If I use only ignore dbus-user none without any dbus-user filter it works as intended. So most likely some other portals must have to be allowed. Any help or hint will be appreciated.

btw,is there any way to trace dbus call or trace/log blocked dbus call? hope it makes sense

@rusty-snake
Copy link
Collaborator

btw,is there any way to trace dbus call or trace/log blocked dbus call? hope it makes sense

You can inspect D-Bus names with d-feet or qdbus-viewer or in /usr/share/dbus-1/services/*. To trace/monitor D-Bus calls in the sandbox you can use firejail --log-dbus but this works only for dbus-user filter. Or you can monitor you session-bus with tools such as dbus-monitor, bustle or busctl monitor, However monitoring the session-bus creates a lot of spam which is not form the sandbox. I plan to write a script which catches all the D-Bus traffic of a program using dbus-daemon and dbus-monitor, but I do not have that time ATM. If the program has a flatpak, you can also look at it's permissions.

@Neo00001
Copy link
Collaborator Author

btw,is there any way to trace dbus call or trace/log blocked dbus call? hope it makes sense

You can inspect D-Bus names with d-feet or qdbus-viewer or in /usr/share/dbus-1/services/*. To trace/monitor D-Bus calls in the sandbox you can use firejail --log-dbus but this works only for dbus-user filter. Or you can monitor you session-bus with tools such as dbus-monitor, bustle or busctl monitor, However monitoring the session-bus creates a lot of spam which is not form the sandbox. I plan to write a script which catches all the D-Bus traffic of a program using dbus-daemon and dbus-monitor, but I do not have that time ATM. If the program has a flatpak, you can also look at it's permissions.

ok... I will look into these later.

@Neo00001
Copy link
Collaborator Author

ok. here what worked for me.

dbus-user.talk org.kde.JobViewServer
dbus-user.talk org.kde.kuiserver

thanks for the help.

@rusty-snake
Copy link
Collaborator

So your dbus-policy for firefox looks like this.

dbus-user filter
dbus-user.own org.mozilla.firefox.*
dbus-user.own org.mpris.MediaPlayer2.firefox.*
dbus-user.talk org.freedesktop.Notifications
dbus-user.talk org.kde.JobViewServer
dbus-user.talk org.kde.kuiserver
ignore dbus-user none

Works plasma browser integration w/o org.freedesktop.Notifications? (I want to add a note to firefox.profile.)

@Neo00001
Copy link
Collaborator Author

Works plasma browser integration w/o org.freedesktop.Notifications? (I want to add a note to firefox.profile.)

plasma browser integration works without org.freedesktop.Notifications & regarding proper functioning of plasma browser integration you don't need

dbus-user.own org.mozilla.firefox.*
dbus-user.own org.mpris.MediaPlayer2.firefox.*

I'm using this

dbus-user filter
dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration
dbus-user.talk org.kde.JobViewServer
dbus-user.talk org.kde.kuiserver
ignore dbus-user none

if instead of dbus-user.own org.mpris.MediaPlayer2.plasma-browser-integration I use

dbus-user.own org.mozilla.firefox.*
dbus-user.own org.mpris.MediaPlayer2.firefox.*

then I can pause & resume media from system tray but can't get the thumbnail & the progress bar.

Spec-
OS: Arch(KDE plasma) Kernel: 5.9.1 Plasma ver: 5.20.2 firejail ver:0.9.64

rusty-snake added a commit to rusty-snake/firejail that referenced this issue Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question_old (Deprecated; use "needinfo" or "question" instead) Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants