Duplicated entries of Okular in "Open With" -> "Other Application"

Bug #456093 reported by Gijutsu
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
okular (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: okular

After installation of Okular in Ubuntu 9.10 Karmic, duplicated entries of the application are shown when right clicking on a file in Nautilus and selecting "Open With" -> "Other Application".

ProblemType: Bug
Architecture: i386
Date: Tue Oct 20 09:39:10 2009
DistroRelease: Ubuntu 9.10
Package: okular 4:4.3.2-0ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: kdegraphics
Uname: Linux 2.6.31-14-generic i686
XsessionErrors:
 (gnome-settings-daemon:1870): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:1870): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:1981): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:1975): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:1972): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 24

Revision history for this message
Gijutsu (gijutsu) wrote :
Revision history for this message
Albert Astals Cid (aacid) wrote :

It seems Nautilus might be ignoring the NoDisplay entries of some of the okular .desktop files

Revision history for this message
Gijutsu (gijutsu) wrote :

Albert Astals Cid: Thank you for your reply! Does this means that the bug resides in Nautilus, rather than in Okular? Because if so the affected package should be changed for this bug report.

Revision history for this message
Albert Astals Cid (aacid) wrote :

Well, i can tell you that indeed okular has multiple .desktop files that might be causing this problem, probably that is a bit of "abuse" of the .desktop specification but yes, if i was you i'd try to bug Nautilus developers to support that feature

Revision history for this message
Gijutsu (gijutsu) wrote :

Nautilus does not properly handle the multiple .desktop files that comes with Okular

affects: okular (Ubuntu) → nautilus (Ubuntu)
Revision history for this message
Gijutsu (gijutsu) wrote :

Changed the affected package as seen above with the information provided by Albert Astals Cid (thanks for the information)!

Revision history for this message
Sebastien Bacher (seb128) wrote :

okular should not install several desktop if it doesn't want several entries to be listed!

affects: nautilus (Ubuntu) → okular (Ubuntu)
affects: okular (Ubuntu) → nautilus (Ubuntu)
affects: nautilus (Ubuntu) → okular (Ubuntu)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Have you ever heard of the NoDisplay entry? If not i suggest you to have a look at http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

affects: okular (Ubuntu) → nautilus (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Yes thanks, NoDisplay is a menu thing though, it's not because you don't want a menu item for a software that you should not be able to use it to open files eithere. GNOME use NoDisplay=true for its default pdf viewer for example because it's a viewer that should be used when double clicking on files and there is little interest running it otherwise, you still want to be able to use it though

affects: nautilus (Ubuntu) → poppler (Ubuntu)
affects: poppler (Ubuntu) → okular (Ubuntu)
affects: okular (Ubuntu) → poppler (Ubuntu)
affects: poppler (Ubuntu) → okular (Ubuntu)
Revision history for this message
Sebastien Bacher (seb128) wrote :

the popple reassign was an error ignore it!

Revision history for this message
Albert Astals Cid (aacid) wrote :

Seb, i'm not going to discuss anymore with you, it's obvious you don't care about this issue, so you can close the bug as wontifx if you want.

I'm sure the problem is in nautilus because though Okular installs lots of .desktop files it only installs one .desktop file that says is able to handle pdf files, so why nautilus show entris for the other .desktop files that don't say that?

affects: okular (Ubuntu) → nautilus (Ubuntu)
Revision history for this message
A. Walton (awalton) wrote :

This is an intractable problem to solve from Nautilus. Application developers can generate as many desktop files as they like with the same Name key and there's really nothing we can realistically do with them (we'd just make the menu/dialog enormous by including bogus things like the commandline string or adding numbers for duplicate names which don't really help most users in any way).

It's a trivial problem to solve for misbehaving applications. For a GNOME example of this, see Brasero during the 2.26 cycle. This package used to include many desktop files with identical names. It has since been fixed.

Fix your desktop entries to use different names for calling with different arguments so that they show up in menus differently. As Sebastien noted, we can't use NoDisplay (which was the first solution we tried, and I actually committed it, but had to revert it for applications which use this with different semantics).

It could be solved by going to FreeDesktop.org and figuring out a better way to solve this problem, like reviving actions within desktop files, but this hasn't been seriously proposed by anyone and it's not likely something we'll implement in Nautilus unless there's a consensus that it's the way to go, and it will *still* require you to fix your desktop files.

Changed in nautilus (Ubuntu):
status: New → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

okular is the one shipping those desktop if several are required the naming should be adapted you can close the bug if you don't care though

affects: nautilus (Ubuntu) → okular (Ubuntu)
Changed in okular (Ubuntu):
importance: Undecided → Low
status: Invalid → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

> Okular installs lots of .desktop files it only installs one .desktop file that says is able to handle pdf files, so why nautilus show entris for the other .desktop files that don't say that?

the nautilus dialog which is described there lists all available applications not only the ones associated to the mimetype selected, the choices matching the mimetype are directly in the context menu listing rather

Changed in okular (Ubuntu):
status: New → Invalid
Revision history for this message
wilbur.harvey (wilbur-harvey) wrote :

It is too bad that the Okular developers are so arrogant.
The app is basically a good app, and would be much more widely used if the developers would be more considerate of the users.
Wilbur

Revision history for this message
Carlos (gewan) wrote :

I love Ubuntu so friggin much. I just noticed this bug (Ubuntu 10.10/maverick), and thought I'd call it in. However, I immediately ran into this thread, with already dozens of people discussing slash confirming it's existence. I'm telling you, I love Ubuntu. Such a strong community. It has not been seen before. Remarkable. Wonderful. Now, just hope they'll fix this darn bug. I'm such a newbie I don't even know how to (manually) modify the Open with.. menu so that I could clear the dupe. Gotta go back to school, should never have dropped out. Anyways, 'issue' exists, blame it on Okular or Natilus, I wouldn't know the difference anyways.

Revision history for this message
rCX (rcx) wrote :

Replying to Carlos...

A simple workaround is to right click on the Gnome/Ubuntu main menu select "Edit Menus". In the "Menus:" pane under "Applications", select "Graphics" and delete the extra Okular Entries in the "Items:" pane.

Revision history for this message
Michael Kogan (michael-kogan) wrote :

It's surely not a Nautilus issue (or at least not only Nautilus), since it also appears in Xfce 4.10.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.