2

I know that the .desktop files of installed applications will be found in /usr/share/applications.

Today, I came across the directory /usr/share/app-install/desktop. It contains the same .desktop files of applications installed in my system.

So what is the /usr/share/app-install/desktop directory? Why are there two directories for the same purpose?


UPDATE: Thanks to @serg; he states this question has an answer.

Now I know what this directory is, but I still have a question:

If the .desktop files are all included in /usr/share/app-install/desktop, so why is there also the directory /usr/share/applications? Isn't it a waste of resources to keep both directories up to date?

6
  • 1
    Your question has been asked before: askubuntu.com/q/464807/295286 . May 15, 2015 at 16:32
  • 1
    NOthing more than symoblic links to keep your libaraies in check with each other
    – Virusboy
    May 15, 2015 at 16:45
  • What is the symbolic link?
    – Maythux
    May 15, 2015 at 16:47
  • A symbolic link is a small file that points to another file without consuming so much resources. Let's say that I have the file a and I want to make a copy called b, I can create a symlink from a to b. So I only waste the disk space that requires a and not twice the size of a. And a additional advantage is that when I change the a contents, as b is a symlink, their content will also change.
    – 0x2b3bfa0
    May 15, 2015 at 16:52
  • I know what is symbolic link but I'm saying to Virusboy what do you mean, which is symmbolic link, but anyway thanks for your explanation
    – Maythux
    May 15, 2015 at 17:08

3 Answers 3

3

The files encountered are nothing more than symbolic links to meta file data of installed programs. As Serg explained the apps using the software center go into described folder. They are not real programs but merely point were the system can cache for faster use next time. It more effective and efficient to have a system gather all programs and make meta files and symbolically link them in one area.

But Ubuntu uses two separate package managers. One is apt one is the software center. This in turn creates separate package file systems. This is how Ubuntu deals with it, but instead of throwing it all together, the two systems act like a couple. They both communicate to see what is there, both have root access to both, but they do not share what programs are installed by each other

3
  • small question, "they do not share what programs are installed by each other". I have not installed anything with Software center for long time, but if I install, let's say steam with sudo apt-get install steam shouldn't it also show up in software center as installed on the system ? May 15, 2015 at 17:58
  • Thats where the symbloic linking comes in hand. the meta data is shared but nothing more
    – Virusboy
    May 15, 2015 at 18:13
  • What is your reference to this? So why there are same entries in both directories? It's not just symlink, it's the same files (.desktop) and i know it's not the application itself
    – Maythux
    May 15, 2015 at 18:54
1

Virusboy has the right idea, and after digging around, I can confirm that /usr/share/app-install is related to software manager. This thread mentions that the folder is related to app-install-data package. Doing a simple check apt-cache search app-install-data reveals the following:

 $ apt-cache search app-install-data                                                     
app-install-data - Ubuntu applications (data files)
app-install-data-partner - Application Installer (data files for partner applications/repositories)

And take a closer look at lines 14 and 15

$ apt-cache show app-install-data | nl                                                  
     1  Package: app-install-data
     2  Priority: optional
     3  Section: gnome
     4  Installed-Size: 38425
     5  Maintainer: Michael Vogt <[email protected]>
     6  Architecture: all
     7  Source: app-install-data-ubuntu
     8  Version: 14.10
     9  Filename: pool/main/a/app-install-data-ubuntu/app-install-data_14.10_all.deb
    10  Size: 12815482
    11  MD5sum: 0773479992b257d59c04470d44f737d1
    12  SHA1: 7600aac7d6f69dcfcba458368ad2ca85865735ad
    13  SHA256: 8dd6d1b3add6d9291383bec7e5c2295a9e695c92c5cd39aed270eae24b4606da
    14  Description-en: Ubuntu applications (data files)
    15   This package contains the Ubuntu specific application data and
    16   icons for software-center (and similar tools).
    17  Description-md5: f60778a916e4cfc34f4e6d08cae5fa94
    18  Bugs: https://bugs.launchpad.net/ubuntu/+filebug
    19  Origin: Ubuntu
    20  Supported: 9m
    21  Task: ubuntu-desktop, ubuntu-usb, kubuntu-desktop, kubuntu-full, kubuntu-active-desktop, kubuntu-active-full, edubuntu-desktop, edubuntu-usb, xubuntu-desktop, mythbuntu-frontend, mythbuntu-desktop, mythbuntu-backend-slave, mythbuntu-backend-master, lubuntu-desktop, ubuntustudio-desktop, ubuntu-gnome-desktop, ubuntukylin-desktop, ubuntu-mate-desktop, ubuntu-mate-cloudtop
1

Workaround..Workaround..Workarounds!

Sorry to start this way, but this what I could come up with after following Debian/Ubuntu for few years.

  1. There is a Debian packaging and repository specification in place. Quiet old, they were written years ago.

  2. Ubuntu comes to a place where it wants to add more features for software repository. And for known reasons, they didn't want to update those old specifications or standards.

  3. So they diverge from the standards with some EXTRA features (I call them workarounds, as they don't update/fix the upstream spec)

    Here list of eXtra features those I know:

    • Screenshots (Debian solution)

      Ubuntu share same site with Debian https://screenshots.debian.net/

    • Changelogs (Debian solution)

      http://changelogs.debian.net/
      http://changelogs.ubuntu.com/changelogs/

    • Icons/Desktop files (Ubuntu solution)

      app-install-data package (covers commonly used tools)

      These icon/desktop files in /usr/share/app-install/ are there only for Ubuntu Software Center to show icon even the software is not installed, same for Unity dash while searching for non installed tools and Unity Launcher while installing a tool it brings a jumping icon.

      Where the files in /usr/share/applications are from the packages themselves, the softwares center is unable to use them without downloading and extracting them.

Anyway, this looks like a healthy system, they spread over multiple innovation ideas then after some years come back and agree on a standard.

It seems they have already started the merge, reference: Ubuntu Software Centre To Be Replaced in 16.04 LTS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .