2

Recently, I found that there are two org.gnome.Software.desktop files in two places: one in

/usr/share/ubuntu/applications/

and one in

/usr/share/applications/

Can someone explain why (and how)

/usr/share/ubuntu/applications/org.gnome.Software.desktop

is loaded on the left rather than the latter?

Content of the file /usr/share/ubuntu/applications/org.gnome.Software.desktop

[Desktop Entry]
Name=Ubuntu Software
Comment=Add, remove or update software on this computer
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=ubuntusoftware
Exec=gnome-software %U
Terminal=false
Type=Application
Categories=GNOME;GTK;System;PackageManager;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=Updates;Upgrade;Sources;Repositories;Preferences;Install;Uninstall;Program;Software;App;Store;
StartupNotify=true
MimeType=x-scheme-handler/appstream;x-scheme-handler/apt;x-scheme-handler/snap;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-software
X-GNOME-Bugzilla-Component=gnome-software
X-GNOME-UsesNotifications=true
DBusActivatable=true
X-Ubuntu-Gettext-Domain=gnome-software

Here is my desktop screenshot (Notice the left dock)

Here is my Ubuntu version:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:    18.04
Codename:   bionic

I found that I can get the list of my apps from this command:

$ gsettings get org.gnome.shell favorite-apps
['firefox.desktop', 'thunderbird.desktop', 'org.gnome.Nautilus.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'org.gnome.Software.desktop', 'yelp.desktop', 'org.gnome.Terminal.desktop', 'gnome-control-center.desktop']

Therefore, I think my question can reduce to: Is there an environment variable determining which org.gnome.Software.desktop is loaded?

PRATAP
  • 22,460
Jim Lin
  • 68
  • I found a similar question: https://www.reddit.com/r/Ubuntu/comments/gckepc/whats_the_difference_between_ubuntu_software_and/?utm_medium=android_app&utm_source=share – Jim Lin Jan 29 '21 at 16:25
  • One is from the basic gnome-software package and the other from Ubuntu's custom version of that, ubuntu-software: https://packages.ubuntu.com/search?searchon=contents&mode=exactfilename&arch=any&suite=bionic&keywords=org.gnome.Software.desktop – muru Jan 29 '21 at 17:35
  • 2
  • @muru Almost! Actually, I want to how ubuntu-software is loaded in the left side dock. Is there a file invoking it? Or is there a file that configure the dock? – Jim Lin Jan 30 '21 at 00:11

2 Answers2

0

from this link https://developer.gnome.org/desktop-entry-spec/

If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used.

if you run the command

echo $XDG_DATA_DIRS

you will notice, /usr/share/ubuntu/ before /usr/share/

Example:

$ echo $XDG_DATA_DIRS
/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
$ 
PRATAP
  • 22,460
0

When you compare the two files:

$ diff /usr/share/ubuntu/applications/org.gnome.Software.desktop /usr/share/applications/org.gnome.Software.desktop
2c2
< Name=Ubuntu Software
---
> Name=Software
4c4
< Icon=ubuntusoftware
---
> Icon=org.gnome.Software

You see the ubuntu version uses "Ubuntu Software" and the generic version uses "Software".

Visually in your system you can see:

ubuntu software.png

Image Credit: How to Install Gnome Software as Ubuntu Software in Ubuntu 20.04

Click the link to find out how to change the setting.