After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 92497 - RFE: it should be possible to open a file with an application, without associating
RFE: it should be possible to open a file with an application, without associ...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.23.x
Other other
: Normal enhancement
: 2.24.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-09-04 17:11 UTC by Uri David Akavia
Modified: 2009-09-30 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screencast showing nautilus opening unknown file with patch (940.71 KB, video/ogg)
2009-09-23 21:18 UTC, Marcus Carlson
  Details
First patch to add "Open With" button to error dialog (3.91 KB, patch)
2009-09-23 21:20 UTC, Marcus Carlson
none Details | Review
Adds an option to "Remember this application for... " files of the same type (6.25 KB, patch)
2009-09-24 20:15 UTC, Marcus Carlson
none Details | Review
Screenshot of patched Open With dialog (175.86 KB, image/png)
2009-09-24 20:19 UTC, Marcus Carlson
  Details
Updated patch as wished by Alexander (8.18 KB, patch)
2009-09-27 10:38 UTC, Marcus Carlson
none Details | Review
Updated screenshot (124.09 KB, image/png)
2009-09-27 10:39 UTC, Marcus Carlson
  Details
Adds an option to select the application to open an unkown file type upon error opening the file. (4.46 KB, patch)
2009-09-29 19:25 UTC, Marcus Carlson
committed Details | Review

Description Uri David Akavia 2002-09-04 17:03:21 UTC
Package: nautilus
Severity: enhancement
Version: 2.0.4
Synopsis: RFE: it should be possible to open a file with an application, without associating
Bugzilla-Product: nautilus
Bugzilla-Component: File and Folder Operations

Description:
Description of Problem:
I think that Other Application... should act more like windows - it
should give you an option to open the file with a selected application
without associating the file type with this application. It should also
give you the option to associate.

It could be useful if you want to see the general file structure in
gedit or something. I also like to try opening the file in a certain
application, see if it works and then decide whether or not to
associate.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-09-04 13:03 -------

Reassigning to the default owner of the component, nautilus-maint@bugzilla.gnome.org.

Comment 1 David Kennedy 2002-11-23 17:02:28 UTC
Past feature freeze, changing GNOMEVER to 2.3. Marking NEW, adding
usability since this is a usability change 
Comment 2 Sebastien Bacher 2003-11-23 13:37:21 UTC
Nautilus 2.4 open the file without associating them, this bug is
probably fixed. Could you test to if it's work fine with nautilus 2.4 ?

Thanks
Comment 3 Uri David Akavia 2003-11-26 18:32:14 UTC
I don't know how to do this in Nautilus 2.4.1.

Double-click on the file, right click and selecting open, right-click
and selecting open with... (application or viewer) give me the same
dialogue:

There is no action associated with "umlaut.kwd".

You can configure GNOME to associate applications with file types. Do
you want to associate an application with this file type now?

Cancel                Associate Application

I see no way to open the file with another application without
associating it.

Checking a wav file, which I have an association, I see the same
problem I reported - I can only add another application to the menu,
then open it with that application.
Comment 4 Allison Karlitskaya (desrt) 2004-03-31 11:22:44 UTC
Still a problem (for me, at least) with 2.6.0.  Is this actually working for
other people?
Comment 5 Allison Karlitskaya (desrt) 2004-03-31 11:31:39 UTC
On first glance: when you right-click on a file that already has 1 or more
possible associations you get (for example):

Open With > gedit
            vi
            vim
            Other Application...

In this case, Other Application dialog pops up. (which seems good)

The other case is when you right-click a file that has no associations and you get:

Open With > An Application...

In this case, the filetype association dialog pops up (bad).

Both cases are equivilent, however.  In the "Other Application" dialog you're
still only presented with a list of applications associated with the file type
that you are attempting to open.

ie: in the case of a filetype with no associations, this dialog would be empty
anyway and you'd only have the [Modify] and [Go There] buttons that take you to
the first case.

It should be possible to open unknown filetypes (or possibly even known
filetypes as well) with any application via this (or some other) dialog without
making an association.
Comment 6 Uri David Akavia 2004-04-03 17:58:43 UTC
I can confirm it does not work with Nautilus 2.6.
In fact, to my eyes, both situations don't work, with respect to my esteemed
fellow bug checker. When you have a file that has associations, you still CAN'T
open the file with another application. Yes, you can add another application to
the menu. However, you can't open this file with an application.
I would like something similar to "Run Programm" dialogue, when I select open
with an(other) application - I can type the name of the application in it, or I
can browse for the application.
If GNOME will add this application to applications that can be added to the
menu, fine. If GNOME wants to add it to the menu, fine.
Therefore, this bug should stay as NEW.
Comment 7 Allison Karlitskaya (desrt) 2004-08-03 23:38:04 UTC
With the new freedesktop.org MIME stuff in 2.7 does this bug really apply anymore?
Comment 8 Uri David Akavia 2004-10-02 10:10:36 UTC
Yes, this stuff still applies.
Opening a file that has an application associated with it - Works.
Opening such a file with another application - Works (it is also added to the menu).

Opening a file that has NO application associated with it - Fails. The error
messages are:
Couldn't display "/home/uridavid/umlaut.kwd".
There was an error launching the application.

In this last case, Nautulis should launch the "open with other application..."
dialog (or a similar dialog).

Summary - this bug stays open.
Comment 9 Uri David Akavia 2006-01-01 15:44:21 UTC
This is almost (but NOT) fixed in Nautilus 2.10.1.

Almost - right-click gives you an option to "Open in other application" correctly calling the relevant dialogue.

Not - Double-click gives an error message stating only "Couldn't display /home/uridavid/umlaut.kwd". It is unclear WHY it couldn't display this file.

Requested - Double-click will open the "Open with other application..." dialogue when there are no applications associated with the file.
Comment 10 Mantas Kriaučiūnas 2006-01-29 12:05:10 UTC
Anybody cares about this pretty important accessibility bug ? I think, that it's pretty easy to patch nautilus to show applications selection dialog (which is displayed, when user chooses "Open with Other Application") when user press on any unassociated file type with left mouse button.
Comment 11 Uri David Akavia 2006-09-04 12:00:53 UTC
Still not fixed in Nautilus 2.14.3.
Still gives out the non-helpful error message.

Poking the developers.
Comment 12 Uri David Akavia 2007-08-23 16:34:44 UTC
Still unfixed in Nautilus 2.18.3.

Hooray, Hooray!
This bug is now almost 5 years old.
Comment 13 Uri David Akavia 2008-05-02 19:04:10 UTC
Still unfixed in Nautilus 2.20.0

This bug is now 6 years old.
Comment 14 Cosimo Cecchi 2008-05-02 23:34:47 UTC
This is valid for 2.23.1 too, let's try to fix it for 2.24.
Comment 15 Marcus Carlson 2009-09-20 22:01:45 UTC
I might give this one a try. Do we just want a button that says "Open with" or "Choose application" in the dialog that appears after double clicking the file and then show the "Open With" dialog?
Comment 16 Marcus Carlson 2009-09-23 21:18:56 UTC
Created attachment 143838 [details]
Screencast showing nautilus opening unknown file with patch
Comment 17 Marcus Carlson 2009-09-23 21:20:13 UTC
Created attachment 143839 [details] [review]
First patch to add "Open With" button to error dialog

Here's first patch to add an "Open With" button in the error dialog upon opening a file with unknown type.

Comments?
Comment 18 Uri David Akavia 2009-09-23 22:47:20 UTC
One question.

Does this patch associate the new application (in the example you gave GEdit) with the file, or does it just open with GEdit?

Can I get an option, when opening with an application (in this case GEdit), to associate this application with the specific file type?

Thanks.
Comment 19 Marcus Carlson 2009-09-24 06:46:48 UTC
(In reply to comment #18)
> One question.
> 
Actually it looks like two ;-)

> Does this patch associate the new application (in the example you gave GEdit)
> with the file, or does it just open with GEdit?

Yes. As it uses the same code as the "Open With Another Application" it will behave the same. 

> 
> Can I get an option, when opening with an application (in this case GEdit), to
> associate this application with the specific file type?

I'll see if I can add an option to that window, "[x] Always open files of type ??? with this application". Or something like that?

> 
> Thanks.
Comment 20 Marcus Carlson 2009-09-24 20:15:38 UTC
Created attachment 143938 [details] [review]
Adds an option to "Remember this application for... " files of the same type

Discussed this problem with alex in #nautilus and we agreed this would be the best. Note that this patch only changes the Open With dialog, you still need the last patch to have the button in the error dialog.

Also I'm no good at designing things so there's room for improvements (screenshot coming in a second)

Comments?
Comment 21 Marcus Carlson 2009-09-24 20:19:45 UTC
Created attachment 143941 [details]
Screenshot of patched Open With dialog

Left dialog showing (untouched) Add Application dialog and the right shows the new and improved Open With dialog with an option to remember the application for files of the same type.
Comment 22 Alexander Larsson 2009-09-25 08:09:26 UTC
From irc review:
<alex> mdc_work: hmm, the checkbox should be under the custom command thing, since that is part of picking the app
<alex> _("Open all %s with:")
<alex> these kinds of hacks with strings are no good
<alex> they break translation, where word ordering is not always like its in english
<alex> you need to have each "full sentence" as a sting, with only the type name as %s
<alex> mdc_work: see e.g. http://www.gnu.org/software/hello/manual/gettext/Preparing-Strings.html
<alex> mdc_work: also, i'd prefer to have a real boolean instead of piggybacking on the checkbox being hidden
Comment 23 Marcus Carlson 2009-09-27 10:38:08 UTC
Created attachment 144106 [details] [review]
Updated patch as wished by Alexander

Fixes the issues Alexander pointed out; complete sentences, adding a boolean to private for add mode and move the remember application to the end of the dialog.
(Also fixed an embarrassing bug).
Comment 24 Marcus Carlson 2009-09-27 10:39:39 UTC
Created attachment 144107 [details]
Updated screenshot
Comment 25 Alexander Larsson 2009-09-28 15:01:41 UTC
commited.
Comment 26 Marcus Carlson 2009-09-28 16:09:50 UTC
Alex, note that the committed patch was just one part of this bug. The other part that adds the button to the dialog is not part of the commit.
(Maybe awalton will commit it so don't take action before checking with him or me first)
Comment 27 Alexander Larsson 2009-09-29 08:56:21 UTC
About the open with button:

+				g_object_ref (file),
+				(GDestroyNotify)g_object_unref);

Please use nautilus_file_ref/unref when handling NautilusFile objects, as we have some helpers there to debug refcount issues.

Also, the button has a pretty bad name. "Select Application" sounds better.
Comment 28 Marcus Carlson 2009-09-29 19:25:31 UTC
Created attachment 144290 [details] [review]
Adds an option to select the application to open an unkown file type upon error opening the file.
Comment 29 Alexander Larsson 2009-09-30 10:13:42 UTC
Attachment 144290 [details] pushed as 58a0733 - Adds an option to select the application to open an unkown file type upon error opening the file.