-
Notifications
You must be signed in to change notification settings - Fork 557
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
chromium: file dialog does not work #5032
Comments
I'm not familiar with KDE but there's a comment on the last line in /etc/firejail/chromium-common.profile that you might try:
As a quick test you can add it without the conditional, just to double-check if you can get your Plasma tools working in the sandbox. Add the below line to your chromium.local and run your command again:
Does that change anything for the better? |
I added like this: |
Might be a duplicate of #4965. Try adding the below to your /home/user/Data/jail/.config/firejail/chromium.local
|
It doesn't change anything. I need to rephrase this: "Expected behavior would be to be able to download / upload files in Chromium from Plasma KDE dialog and when downloaded, see them in Dolphin." The other thing is that when I run Chromium without Firejail it uses KDE dialog and uploads files correctly. So, the conclusion is there is something in profiles or firejail that makes a difference. |
Does your dolphin run firejailed too?
What does the Imgur error say exactly? |
https://i.imgur.com/QvsTaQt.png
No. |
I've put together a test profile to debug this. The private option is inside the file as you can see. Just to keep the command a bit shorter, shouldn't make any functional difference. Please download this file, place it in your ~/Data/jail/.config/firejail dir as |
With The fact that dialog doesn't appear is caused by: |
I'm out of ideas on this one. Copy chromium.profile and chromium-common.profile from /etc/firejail to your ~/Data/jail/.config/firejail and start commenting lines until you get a working configuration. |
Hello omega3, I've had the same problem with Chromium using openSUSE with KDE for a couple of months. Downloads only work directly into the downloads folder. Saving web pages only works using the print option. Uploads don’t work at all. /etc/firejail/chromium-common-hardened.inc.profiledoes the trick for me. However, I usually keep the noroot option enabled. I only disable it when I know that I want to upload something. Sometimes I just use Firefox instead in these rare occasions which has noroot enabled per default. The hardened profile isn’t enabled per default in openSUSE. You have to manually uncomment the include chromium-common-hardened.inc.profileline in /etc/firejail/chromium-common.profileMaybe the noroot option is hidden somewhere else in one of the various profiles chromium uses. |
@Kebron718 That's some impressive detective work. Never suspected
The extra hardening is always disabled by default, regardless of distro.
No it's only in chromium-common-hardened.inc.profile AFAICT (it should be). |
Unfortunately, this didn't work for me. This wiki shows many dbus options but I have no idea what they do. Although I am not programmist I think that this issue may be connected to dbus options because with gtk dialog it works. The problem is how chromium in firejail "communicates" with kde system. |
Unfortunate to say the least.
The discussion you're refering to is now reality. Has been for a while. Firejail has integrated
We already discussed
Most, if not all the DE-related files for both GTK and QT/KDE reside in the included *.inc files in the profile. To check if you need anything additional stuff, try not including any of those, just as a test to see if that changes anything. Together with the above D-Bus remarks that brings me to the below ~/.config/firejail/chromium-common.local:
Just make sure you don't have anything in globals.local and existing chromium{,-common}.local files that might throw sand in the machine. |
It doesn't work.
chromium-common-hardened.inc.local:
chromium-common.local:
chromium.local
|
File-dialog broken by |
@rusty-snake Thanks for joining in. Obviously I don't understand the problem at hand and all I'm achieving here is confusing the OP. And myself for that matter. Twice already @omega3 said |
Some xdg-desktop-portal implementations (in some versions) are broken (for some features) if the sandbox is started with |
@rusty-snake Thanks for providing context and insights. Sounds a real mess :-) With that many unknowns (the multiple |
can confirm
apt list xdg-dbus-proxy apt list firejail |
I can also confirm that with Ubuntu 22.04 & using latest Google-Chrome, we are unable to upload anything as well. I think one issue is that the --private=/folder is not being respected by all aspects of the jailed app, such as Gnome's file selection interface. On Ubuntu 20.04, when you used the open file dialog (CTRL+O), it would look like the opened location was the home folder of the user, while actually being the /folder it was jailed at. With 22.04, however, it always opens the actual $HOME folder and gives a list of all files and folders inside it, despite being unable to actually read any of the files when you try to open them. Maybe what's happening is that there is some sort of a mismatch that prevents uploads: Gnome is sending one file location that uses the actual $HOME as a point of reference (which the jailed app doesn't have access), whereas the jailed app expects a file that matches the --private=/folder point of reference. I thought this because, when trying to save files (as someone explained above), the only time a save succeeds is when the save targets $HOME/Downloads as selected by Gnome's file selection interface. All other attempts at saving at other locations fail. And when save succeeds, it actually saves to the jailed /folder/Downloads rather than the selected $HOME/Downloads in Gnome's file selection interface. I have no real knowledge of the underlying infrastructure so I can't pinpoint the issue any further. This is just what I observe, maybe it will help. Incidentally, the only error in the console output is: |
The document-portal does not support firejail (or firejail does not support the document-portal, take it as you like). |
Hello,
Is there a workaround? |
Discussed in #5025
Originally posted by omega3 March 9, 2022
Chromium doesn't allow to upload file for example to imgur. I am using Chromium on Plasma KDE. Imgur shows error.
When I add
nodbus
it opens diffrent dialog, I guess it is gtk diolog - not Plasma KDE - and I can upload. But when I save file with this setting and this dialog I can't see them in Dolphin.What to do?
Expected behavior would be to be able to download / upload files in Chromium from Plasma KDE dialog and when downloaded, see them in Dolphin.
I use
chromium.local
profile, which is basically the same as in /etc/Firejail and run Chromium like this:firejail --private=/home/user/Data/jail/ --profile=/home/user/Data/jail/.config/firejail/chromium.local /usr/bin/chromium
I can download file from the Internet for example from Imgur to Downloads folder in this custom fake /home but at the same time I can't upload.
I added to
chromium.local
but it doesn't work.
Giving full path or something like this:
also doesn't work.
This doesn't work:
This doesn't work:
With this uploading works:
I am not sure about apparmor. I have it installed but as far I as remember I don't use it, perhaps I blocked it a long time ago. But Firefox works with default Firefox profile and upload works.
My chromium.local
The text was updated successfully, but these errors were encountered: