Dash ignores NoDisplay=true if desktop file name contains a colon

Bug #916201 reported by Jeremy White on 2012-01-13
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Fix Released
Michal Hruby
unity (Ubuntu)
unity-lens-applications (Ubuntu)

Bug Description

If I have a .desktop file with NoDisplay=true, and a mime association, it should create an application that shows up in a mime selection list, but not in the main application search or menu.

If I use a file named test-foo.desktop, and then invoke:
  xdg-desktop-menu install test-foo.desktop
it behaves correctly. No search for foo in dash shows anything, but a right click on a .exe offers up Foo as a choice.

If I uninstall test-foo.desktop, copy it to a file named:
and repeat the process, the Foo application appears in a dash search, which it should not.

This impacts all CrossOver installations, and since CrossOver likes to establish mime types to launchers without polluting the menu space, this bug really makes CrossOver + Unity an ugly experience.

Related branches

This may well be a duplicate of Bug #879889, although the symptoms reported there seem different than what I've noticed.

Changed in unity-lens-applications:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity-lens-applications (Ubuntu):
status: New → Confirmed

This was created by this commit:

revno: 242.1.5
committer: Michal Hruby <email address hidden>
branch nick: unity-lens-applications
timestamp: Wed 2011-10-05 12:47:44 +0200
  Fix the de-duplication of Installed and Available apps
=== modified file 'src/daemon.vala'
--- src/daemon.vala 2011-10-05 10:47:11 +0000
+++ src/daemon.vala 2011-10-05 10:47:44 +0000
@@ -626,6 +626,13 @@
         string desktop_id = Path.get_basename (pkginfo.desktop_file);
         string full_path;

+ /* S-C uses "app_name:desktop_id.desktop", get rid of the prefix */
+ int colon_pos = desktop_id.index_of (":");
+ if (colon_pos > 0)
+ {
+ desktop_id = desktop_id[colon_pos+1:desktop_id.length];
+ }
         AppInfo? app = appmanager.lookup (desktop_id);
         full_path = appmanager.get_path (desktop_id);

This patch fixes the issue for me.

Omer Akram (om26er) on 2012-01-19
Changed in unity-lens-applications:
assignee: nobody → Michal Hruby (mhr3)
assignee: Michal Hruby (mhr3) → nobody

The attachment "916201.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch

Thanks for the patch, but I suggest you to make a branch of unity-lens-applications and request it for merge with trunk.

Michal Hruby (mhr3) on 2012-01-24
Changed in unity-lens-applications:
assignee: nobody → Michal Hruby (mhr3)
importance: Undecided → Low
status: Confirmed → Triaged
milestone: none → 5.0.2
Didier Roche (didrocks) on 2012-01-26
Changed in unity (Ubuntu):
status: Confirmed → Invalid
Omer Akram (om26er) on 2012-01-27
Changed in unity-lens-applications (Ubuntu):
importance: Undecided → Medium
no longer affects: unity (Ubuntu)
Changed in unity-lens-applications:
status: Triaged → Fix Committed
Changed in unity-lens-applications (Ubuntu):
status: Confirmed → Fix Committed
Didier Roche (didrocks) on 2012-02-01
Changed in unity:
status: New → Fix Committed
Omer Akram (om26er) on 2012-04-05
Changed in unity:
status: Fix Committed → Fix Released
Changed in unity-lens-applications (Ubuntu):
status: Fix Committed → Fix Released
Changed in unity-lens-applications:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers