Closed Bug 1299017 Opened 8 years ago Closed 11 months ago

File download: Not allowed to select helper-application from my system

Categories

(Core :: Widget: Gtk, defect, P5)

48 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: CarlPonder, Unassigned)

References

Details

(Whiteboard: tpi:+)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160728203720

Steps to reproduce:

Download a .qfx file.
Select "Open with [Other]"


Actual results:

It shows a list of installed applications.


Expected results:

It should give me the option of browsing my directory-structure.
I used to be able to do this.
Even the "Find New Applications" won't let me look in my directories, it only shows me what's available through the Ubuntu Software Center.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Just for reference, I have a collection of scripts I wrote for processing .qfx files to manage my bank etc. account. I wasn't impressed with GnuCash (which mis-matched transactions) and SKrooge.

By writing my own scripts I'm able to deal with idiosyncrasies in the way they misuse the .qfx format and don't have any problems with mis-matched transactions. I'm also able to generate non-standard reports, like one that treats the pool of open bank transactions as a line of short-term credit.

It does require that I be able to select the right script to match each account at the point where I download the .qfx file. Just offering me a list of installed Ubuntu utilities isn't enough.
My workaround is to go to the

     Edit -> Preferences -> Applications -> qfx

Then select the "action" field and browse my directory-tree for the script that I want to use.
This is a pain to do while I'm in the middle of trying to download.
See Also: → 388057
See Also: → 1263356
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

I have tested your issue on latest Firefox release (v48.0) and latest Nightly (Build ID: 20160902030222) and observe that the file tree/system cannot be browsed when we download a file and selecting "Open with [Other]" option. I my opinion this is how Ubuntu OS works. In Windows we have the possibility to search through the file system for other apps. I will assign a possible related component. Maybe someone with more experience could provide some feedback for this issue.
Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
Hi, Gijs,

May I have your help?
I saw we did many changes on GtkAppChooserDialog (Bug 1129873).
Is it a side effect or a expected behavior of the change (Bug 1129873)?
Flags: needinfo?(gijskruitbosch+bugs)
See Also: → 1129873
(In reply to William Hsu [:whsu] from comment #4)
> Hi, Gijs,
> 
> May I have your help?
> I saw we did many changes on GtkAppChooserDialog (Bug 1129873).
> Is it a side effect or a expected behavior of the change (Bug 1129873)?

Karl will have a better answer than me.
Component: File Handling → Widget: Gtk
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(karlt)
Product: Firefox → Core
(In reply to :Gijs Kruitbosch from comment #5)
> (In reply to William Hsu [:whsu] from comment #4)
> > Hi, Gijs,
> > 
> > May I have your help?
> > I saw we did many changes on GtkAppChooserDialog (Bug 1129873).
> > Is it a side effect or a expected behavior of the change (Bug 1129873)?
> 
> Karl will have a better answer than me.

@ Gijs, Thanks! :)

@ Karl, may I have your help?
(In reply to William Hsu [:whsu] from comment #4)
> I saw we did many changes on GtkAppChooserDialog (Bug 1129873).
> Is it a side effect or a expected behavior of the change (Bug 1129873)?

The intended behavior was to provide the same interface that other GTK apps may use to choose an application.  It wasn't directly intended to prevent selecting any file, but if the GTK application chooser doesn't provide this, then that change is kind of expected.

The best solution for your use case would be to configure your system to know about your scripts as handlers for qfx files.  If Ubuntu doesn't provide UI for adding your scripts then it can be done through adding a suitable .desktop file.
~/.local/share/applications/ would be where to place this file unless Ubuntu has configured differently.

Having a single configuration for the system, instead of a separate config for the browser means that when the files are downloaded to a folder, then opening them from the file manager provides the same options.
Flags: needinfo?(karlt)
Priority: -- → P5
Whiteboard: tpi:+
Blocks: 1129873
See Also: 1129873
(In reply to Karl Tomlinson (:karlt) from comment #7)
> Having a single configuration for the system, instead of a separate config
> for the browser means that when the files are downloaded to a folder, then
> opening them from the file manager provides the same options.

That assumes everyone uses a desktop environment with a graphical file manager to open files. I'd be surprised to learn that I'm the only one who typically opens files in applications by entering an appropriate command on a command line; prior to the change described in Bug 1129873 Firefox was able to match that workflow via a field in which I could specify an application, and now it cannot.
Since we hit complains from our users from time to time I'd rather prefer to remove/disable gtk3 application chooser by default despite it's sad for me, because I've implemented it for Firefox. GTK guys has no intention to allow users to pick file by file chooser dialog, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1255955
So you prefer to make things painful for everyone, just so that the few people that like doing things manually have to do things less manually?
Basically what should work instead of GTK application chooser dialog is to fill combobox element in this dialog [1] with the same list of applications. Of course only with the same mime type like [2]. Something like GtkAppChooserButton does [3], keeping the "Other..." item with file picker. What we lose is a chance to use "Find application online" button.

[1] http://kb.mozillazine.org/images/FxOpening-doc.png
[2] https://people.gnome.org/~ryanl/gtk/html/appchooserdialog.png
[3] https://developer.gnome.org/gtk3/stable/GtkAppChooserButton.html
(In reply to Mike Hommey [:glandium] from comment #11)
> So you prefer to make things painful for everyone, just so that the few
> people that like doing things manually have to do things less manually?

Add "Choose manually..." under "Other..." or hide it behind an "advanced" toggle, rather than arguing for tyranny of the most simplistic users.

After four years, unfortunately still no change. For some reason, my Debian Mate desktop does not recognise some programs as being able to open .sgf files (a format for board games). And I have no simple way to use one of them. Adding a button to browse the file system so I can look under /usr/games/bin would be an obvious solution

Additions to the previous report.

This is Firefox 82.02 on Debian with Mate desktop

When downloading an sgf file I am offered only one option out of the three sgf editors I have installed, and no way to look for an additional one.

I tried to add the other ones through Edit -> Preferences -> Applications, but the .sgf file type is not listed there and I can find no way to add it.

So I'd say there are two quite important features missing:

  1. No possibility to choose an arbitrary application for opening a file while downloading
  2. No possibility to add a file type in the Applications list

(In reply to pot from comment #15)

I tried to add the other ones through Edit -> Preferences -> Applications, but the .sgf file type is not listed there and I can find no way to add it.

Set the files up to download automatically when you're next prompted what to do with them (ie select the download/save radio item, tick the "always do this" checkbox, and accept the dialog). This will add an item to the list. From there the applications list may be able to help.

If not, close Firefox, and edit handlers.json in your profile (there's a button to open the profile folder in the system file explorer in about:support), such that for the relevant mimetype/extension combination, action is set to 2, and handlers is an array with item(s) of the form:

"handlers":[{"name":"Application Name","path":"/path/to/binary"}]

I don't know why the GTK application chooser dialog is not able to pick arbitrary apps; it would appear that the GTK folks think this is not a bug - https://bugzilla.redhat.com/show_bug.cgi?id=1255955 . Odd, because both macOS and Windows' pickers (even the new win10 one which tries very hard to get you to use the app store) allow this via a link to "Look for another app on this PC".

Tried the first method, but still I don't see the .sgf files in the list.

I will not edit handlers.json, because unless I really need it I prefer avoiding such extreme customisations, which I would certainly forget with time.

Apparently not being able to search for an arbitrary application (which Firefox allowed in old versions) is an ideological choice made by GTK people, to which Firefox people did not rebel. That is life...

Thanks a lot for your guidance.

Severity: normal → S3
Duplicate of this bug: 1623698

This is an issue in the GTK3 picker dialog, and not one Firefox can fix. It should be fixed in GTK3. Closing per :gcp's resolution of the dupe.

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → INVALID
Duplicate of this bug: 1864779
You need to log in before you can comment on or make changes to this bug.