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

Bug #916201 reported by Jeremy White
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Undecided
Unassigned
unity-lens-applications
Fix Released
Low
Michal Hruby
unity (Ubuntu)
Fix Released
Undecided
Unassigned
unity-lens-applications (Ubuntu)
Fix Released
Medium
Unassigned

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:
  test-:-foo.desktop
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.

Tags: patch

Related branches

Revision history for this message
Jeremy White (jwhite-codeweavers) wrote :
Revision history for this message
Jeremy White (jwhite-codeweavers) wrote :

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
Revision history for this message
Jeremy White (jwhite-codeweavers) wrote :

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
message:
  Fix the de-duplication of Installed and Available apps
diff:
=== 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);

Revision history for this message
Jeremy White (jwhite-codeweavers) wrote :

This patch fixes the issue for me.

Omer Akram (om26er)
Changed in unity-lens-applications:
assignee: nobody → Michal Hruby (mhr3)
assignee: Michal Hruby (mhr3) → nobody
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

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)
Changed in unity-lens-applications:
assignee: nobody → Michal Hruby (mhr3)
importance: Undecided → Low
status: Confirmed → Triaged
milestone: none → 5.0.2
Changed in unity (Ubuntu):
status: Confirmed → Invalid
Omer Akram (om26er)
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
Changed in unity:
status: New → Fix Committed
Omer Akram (om26er)
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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