11

For 14.04, I'm trying out Lubuntu LTS.

If I run ls -l /usr/share/app-install/desktop, I get a list of 3085 .desktop files. All except one are dated Apr 18. The exception is:

-rw-r--r-- 1 root root  6328 Mar 28  2013 applications.menu

From the dates, it's clear that all these are installed by default and not by me.

  • Doesn't each GUI-based program bring in its own .desktop file at the time it's installed (mostly in /usr/share/applications)?

  • Then why are these thousands of other .desktop files needed? From their names, most of them haven't anything to do with Lubuntu.

  • Their names are different from regular .desktop files (such as those in /usr/share/applications): many, not all, are like name:name.desktop whereas the regular ones are just name.desktop.
  • The ones I looked at all have a line with X-AppInstall-Popcon=nnn where nnn is a string of digits. I know that Popcon "gathers statistics determining which packages are the most popular with Ubuntu users". But why is that part of these .desktop files?
  • 1
    3086 on my machine. and yes it seems like you are correct. Here is the list: packages.ubuntu.com/trusty/all/app-install-data/filelist seems to me it is all of them and not just installed apps. – Rinzwind May 12 '14 at 13:19
  • PopCon stands for Popularity Contest. From the website: "Popularity Contest is an attempt to map the usage of Debian packages. This site publishes the statistics gathered from report sent by users of the popularity-contest package. This package sends every week the list of packages installed and the access time of relevant files to the server via email. Every day the server anonymizes the result and publishes this survey." There is probably a package popularity-contest on your system that does that. – Jos May 12 '14 at 13:30
  • @Jos, true but are you saying that popcon requires those files? – DK Bose May 12 '14 at 16:39
  • Wild guess: could they be there so that if you try to run a non-installed but existing application you are prompted to install it? Faster than scanning with apt... – Rmano May 12 '14 at 17:30
  • It is tempting to speculate but I really couldn't say what these files are for. I find it worrying that you have 4 times the number of files that @Rinzwind has; I have exactly the same number as him (her?), minus two (but perhaps Rinzwind counted . and .. ;-) – Jos May 12 '14 at 18:49
12

The .desktop files under /usr/share/app-install/desktop are installed by the app-install-data Install app-install-data package. This package provides metadata about applications that is used by the Ubuntu Software Center and (in your case) the Lubuntu Software Center. The package also contains a copy of each application's icon that is referenced from the .desktop files.

Basically, these .desktop files are very similar to the .desktop files that are used by your desktop environment's menu for launching applications. However, as you noticed, they have additional metadata added for things like popularity counts and search keywords.

And, as is probably obvious, the app-install-data package installs a full set of .desktop files and icons on all Ubuntu systems regardless of which flavor is installed, which applications are installed by default, or which applications have been installed or removed on a particular system.

The purpose of all of this is to give users a polished Software Center experience that provides information about all applications that can be installed in Ubuntu without having to query and cache all of it from a web service. The app-install-data package is built for each Ubuntu release from all known applications that are in the Ubuntu repositories. And that allows the user to open the Software Center, search for applications by name or keyword, and be able to see the same name, description, and icon that will show up in their desktop menu or launcher when they install the application.

These metadata files and icons can be removed if you want by simply uninstalling the package that contains them:

sudo apt-get remove app-install-data

Note that removing app-install-data will in turn force removal of lubuntu-software-center, lubuntu-desktop, software-center, and ubuntu-desktop. However, removal of these packages will not affect Synaptic, aptitude, apt-get, or any other front-ends for the apt package manager. Only the Ubuntu Software Center application requires these files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.