Remap renamed .desktop files

Bug #1662296 reported by Jeremy Bícha
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
unity (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Unity needs to better handle .desktop files being renamed. Renamed .desktops are a problem because if a user has favorited an app, the app is no longer favorited when the .desktop changes its name.

A very large number of apps are renaming their .desktop files for better compatibility with flatpak. (For instance gedit.desktop is now org.gnome.gedit.desktop )

This has been handled for only a few apps with a hack:
Ubuntu's gnome-pkg-tools provides /usr/bin/pkg-gnome-compat-desktop-file
https://patches.ubuntu.com/g/gnome-pkg-tools/gnome-pkg-tools_0.19.7ubuntu1.patch

See its use at the end of
https://bazaar.launchpad.net/~ubuntu-desktop/gedit/ubuntu/view/head:/debian/rules#L35

The hack is insufficient because
1. Most GNOME apps are in sync with Debian. Debian doesn't have the pkg-gnome-compat-desktop-file script. It doesn't seem a good idea to make virtually all of GNOME be out of sync with Debian for this issue.
2. Its initial implementation has some flaws. See bug 1606901 and bug 1623748

The renaming has been handled in GNOME Shell with a remap table (dictionary):
https://git.gnome.org/browse/gnome-shell/tree/js/ui/appFavorites.js

I think it would be good if Unity did the same.

Even GNOME Shell's remap table is a hack as there ought to be a better way of handling these renames but their hack works better than what Ubuntu has been doing.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Iain Lane (laney) wrote :

This is wider than Unity.

Does the GNOME lookup table work properly with mimeapps.list?

What about other desktop environments?

I think that to get rid of the compatibility files (a good goal), we probably want to in fact do something with session-migration.

Like:

  - packages put a file somewhere saying that they've renamed
  - session-migration updates mimeapps.list
  - DEs or flavours or session-migration ships some kind of hook to update their own sauce in user configs

Problem:

  - session-migration will only run each hook once, so a new package dropping a file in some .d/ directory won't cause the hook to be re-run. That'll need to be overcome somehow.

I don't plan on working on this (at least not right away), so someone else should feel free to pick it up.

tags: added: rls-aa-incoming
Changed in unity (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

That's not something we are going to fix this cycle, updating the tag according

tags: added: rls-aa-notfixing
removed: rls-aa-incoming
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.