mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #6444] firefox: cannot drag and drop files from Dolphin #3275
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#3275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Utini2000 on GitHub (Aug 23, 2024).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6444
Description
Drag & Drop of files (e.g. adding attachments in a webmail) does not work with Firefox & KDE Dolphin.
Steps to Reproduce
Open Firefox
Browser gmail
Create Mail
Drag & Drop a .pdf from /home/Downloads/ via Dolphin
Expected behavior
Working drag & drop.
Actual behavior
Drag & Drop not working
Behavior without a profile
What changed calling
LC_ALL=C firejail --noprofile firefoxin aterminal?
Then drag & drop will work fine
Additional context
Nope :)
Environment
firefox.local:
Checklist
/usr/bin/vlc) "fixes" it).https://github.com/netblue30/firejail/issues/1139)browser-allow-drm yes/browser-disable-u2f noinfirejail.configto allow DRM/U2F in browsers.--profile=PROFILENAMEto set the right profile. (Only relevant for AppImages)Log
Output of
LC_ALL=C firejail /path/to/programOutput of
LC_ALL=C firejail --debug /path/to/programLink: https://gist.github.com/Utini2000/e78b15f511baf946a3c1ebafa15ac449
@rusty-snake commented on GitHub (Aug 23, 2024):
DnD does not give Firefox an FD but an path. Firefox must be able to open that path.
Tri with
--allusersto make/home/Downloadsvisible.@Utini2000 commented on GitHub (Aug 23, 2024):
@rusty-snake
That does not work either:
@Utini2000 commented on GitHub (Aug 28, 2024):
Any more ideas?
@kmk3 commented on GitHub (Aug 28, 2024):
This is probably related to dbus; try the following:
@Utini2000 commented on GitHub (Aug 29, 2024):
@kmk3 Thanks, I disabled the dbus parameters one by one and the ones breaking drag & drop are:
I added these to firefox.local:
No idea if this causes any major security issues but if not, this should be set by default since drag & drop is an essential "feature" with a browser (e.g. sharedrives, picture upload, ....)?
@ghost commented on GitHub (Aug 29, 2024):
firefox.profile already has
ignore dbus-user none:5edddc918e/etc/profile-a-l/firefox.profile (L65)Using
ignore dbus-user filterwill break URL opening and mpris support.This might not be an issue for you, but it would be much nicer if you could try to find which dbus filters would get DnD working on KDE. Have you seen the dbus comments in firefox.profile and tried some of the KDE-related ones yet?
5edddc918e/etc/profile-a-l/firefox.profile (L57-L59)@Utini2000 commented on GitHub (Aug 29, 2024):
@glitsj16 woopsie you are right. I only had to add "ignore dbus-user filter" to get it to work.
The following are already in my firefox.local but didn't help:
Keepass:
KDE (kdeconnect not installed):
Any other dbus filters I should try adding?
@ghost commented on GitHub (Aug 29, 2024):
Never actually touched KDE so nothing I can suggest offhand. But I see there's a org.kde.dolphin.FileManager1.service in the dolphin package on Arch, so try
dbus-user.talk org.kde.dolphin.FileManager1I'd say. Other than that you can try using something like busctl or d-feet to inspect what dbus commands dolphin is using (as suggested by @kmk3 above in the Librewolf issue).@rusty-snake commented on GitHub (Aug 29, 2024):
Since GNOME+Nautilus+Firefox+Wayland works for me, do you run a x11 or Wayland session?
@Utini2000 commented on GitHub (Aug 29, 2024):
@rusty-snake I am on wayland - what about you?
@Utini2000 commented on GitHub (Aug 30, 2024):
@glitsj16 the "dbus-user.talk org.kde.dolphin.FileManager1" does not help and also busctl does not list it for me?
Here is the whole
busctloutput:busctl
@rusty-snake commented on GitHub (Aug 30, 2024):
It is per user after all, so it listens on the session bus not on the system bus.
@Utini2000 commented on GitHub (Aug 30, 2024):
Uhm not sure what to do with that information. Does it mean the problems root is somewhere else or should I set a different allowed dbus rule?
@rusty-snake commented on GitHub (Aug 30, 2024):
You busctl command was
busctl --system(implicit) notbusctl --user@Utini2000 commented on GitHub (Aug 30, 2024):
Oh sorry for that. Here is
busctl --userwith dolphin running so that it actually also shows up:busctl --user
So the next rules to try would be:
Correct?
@rusty-snake commented on GitHub (Aug 30, 2024):
FileManager1 has no relevant interfaces AFAIK.
org.kde.KIOFuse, org.kde.kio* look more interesting to me.
@Utini2000 commented on GitHub (Aug 30, 2024):
Added these to my firefox.local but it didn't help / fix the issue:
This also didn't help:
@rusty-snake commented on GitHub (Aug 30, 2024):
Can you try
dbus-user.talk org.kde.*to narrow it down.@Utini2000 commented on GitHub (Aug 30, 2024):
Sure! I tried but it didn't fix the issue.
@rusty-snake commented on GitHub (Aug 30, 2024):
and then do a binary search with it
@Utini2000 commented on GitHub (Aug 30, 2024):
Uhm I am sorry but what do you mean with binary search?
I could just divide the whole outputted list in 10 parts, then add each part step by step until I figure out which part contains the required line and then inspect that specific part.
Or rather keep diving the whole output by 50% until I figure out the rogue line :P
Here is the output btw:
busctl
@rusty-snake commented on GitHub (Aug 30, 2024):
Pretty much this. But keep in mind that it is possible that more than one line is required, which can make find them harder.
@kmk3 commented on GitHub (Aug 31, 2024):
@Utini2000
The following might work to narrow it down (untested):
Find the Firefox service name:
Then run a command to monitor it, drag and drop a file from Dolphin and stop
the command with Ctrl+C:
(Edit: Wrong command; see below)
What is the grep output?
What is in ~/firefox-dbus.txt?
@rusty-snake on Aug 29:
Do you know which dbus name is used in this case?
@rusty-snake commented on GitHub (Aug 31, 2024):
The relevant interface seems to be
org.freedesktop.portal.FileTransfer. In the monitoring log it is called by unique name.@Utini2000 commented on GitHub (Aug 31, 2024):
@kmk3
This is the output:
Adding "dbus-user.talk org.freedesktop.DBus.Properties" didn't help / didn't fix the issue.
I didn't have the time to try all the entries from this post: https://github.com/netblue30/firejail/issues/6444#issuecomment-2321538938
But I will do so if that is what it takes :) Probably got the time tomorrow!
@rusty-snake commented on GitHub (Aug 31, 2024):
This is the system bus which is surely not used for DnD in a session.
Is an interface name for which you can not add talk rules
dbus-user.talk org.freedesktop.*@Utini2000 commented on GitHub (Aug 31, 2024):
YES! :) Your rule fixes the issue.
So it must be something in here:
@rusty-snake commented on GitHub (Aug 31, 2024):
@Utini2000 commented on GitHub (Aug 31, 2024):
Yes sir, this is fixing the issue! :)
This debugging was interesting. Will this get into the original firefox.profile and help other users then?
@kmk3 commented on GitHub (Oct 1, 2024):
For reference, the previous
busctlcommand was wrong.It should work with the following: