OnlyShowIn and NotShowIn not properly honored

Bug #1869905 reported by Ken VanDine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)

Bug Description

glib provides g_app_info_should_show to determine if a desktop file should be shown in the app grid based on OnlyShowIn and NotShowIn using XDG_CURRENT_DESKTOP. This isn't being honored in gnome-shell when NotShowIn=ubuntu:GNOME or OnlyShowIn=ubuntu:GNOME and XDG_CURRENT_DESKTOP is ubuntu:GNOME.

glib does have tests for this that are still passing and @seb128 wrote a simple test case to show the glib API does the right thing.

The snap-store snap in the beta channel provides two desktop files, one to be displayed when XDG_CURRENT_DESKTOP is ubuntu:GNOME and one for when it isn't.

Revision history for this message
Ken VanDine (ken-vandine) wrote :
tags: added: rls-ff-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

Install the snap-store snap from the beta channel and

$ gcc onlyshowin.c -o onlyshowin `pkg-config --cflags --libs gio-unix-2.0`

$ grep NotShow
/var/lib/snapd/desktop/applications/snap-store_snap-store.desktop
NotShowIn=ubuntu

$ ./onlyshowin snap-store_snap-store.desktop
Display of snap-store_snap-store.desktop in ubuntu:GNOME is false

Changed in gnome-shell (Ubuntu):
importance: Undecided → High
Revision history for this message
Sebastien Bacher (seb128) wrote :

But gnome-shell is listing the entry

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Changed in gnome-shell (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: New → In Progress
Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note the fix only exists on master (3.37), not in 3.36.

tags: added: focal
tags: added: fixed-in-3.37.0 fixed-upstream
Revision history for this message
Sebastien Bacher (seb128) wrote :

The fix also doesn't seem to be enough to resolve the issue there

Changed in gnome-shell (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Sebastien Bacher (seb128) wrote :

The testing was buggy from my side, I tried again and it works :-)

Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-in-3.36.2
tags: removed: fixed-in-3.37.0
tags: added: rls-ff-tracking
removed: rls-ff-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.9 KiB)

This bug was fixed in the package gnome-shell - 3.36.1-4ubuntu1

---------------
gnome-shell (3.36.1-4ubuntu1) focal; urgency=medium

  * Merge with debian, with new upstream releases and cherry-picked fixes:
    - Lockscreen password field is stretched on enter (LP: #1869916)
    - Downscaled lockscreen background with fractional scaling (LP: #1866851)
    - Volume keys doesn't always produce a sound (LP: #1870958)
    - Shell crashes when using show-apps button in dock (LP: #1868659)
    - App folders improvements
    - Don't load app infos in the main thread
  * debian/patches:
    - Refreshed
  * d/p/ubuntu/desktop_detect.patch:
    - No need to include desktop.js into the prefs gresources anymore
  * Remaining changes with debian:
    - Replace gnome-backgrounds dep with ubuntu-wallpapers and Suggests
      gnome-themes-standard-data, gnome-backgrounds
    - Add some Recommends:
      + ubuntu-session (| gnome-session) to have the ubuntu session available
      + xserver-xorg-legacy
      + yaru-theme-gnome-shell for the default ubuntu theming
    - Update debian/gbp.conf with Ubuntu settings
    - gnome-shell-common.prerm: Remove deprecated ubuntu theme alternative
    - ubuntu/desktop_detect.patch:
      + add caching for desktop detection to avoid querying the current
        desktop env variable as iterate through the list each time. For the
        time of the Shell process, we can expect this env variable to stay
        stable.
    - ubuntu/smarter_alt_tab.patch:
      + quick alt-tab (without showing up the switcher) switch only between
        the last window of the last 2 applications to be focused instead of
        raising all windows of those apps.
    - ubuntu/lightdm-user-switching.patch:
      + Allow user switching when using LightDM.
    - ubuntu/lock_on_suspend.patch
      + Respect Ubuntu's lock-on-suspend setting.
    - ubuntu/background_login.patch
      + Change default background color as we modified the default GDM color
        for our ubuntu session.
    - ubuntu/gdm_alternatives.patch
      + Add support for GDM3 theme alternatives
    - optional-hot-corner.patch
      + enable patch proposed by upstream developer already in package (but
        not in series) to add a settings for optional hot corner activation.
    - main-show-an-error-message-on-gnome-shell-crash.patch,
      global-make-possible-to-set-debug-flags-dynamically.patch,
      main-increase-the-granularity-of-backtraces-in-SHELL_DEBU.patch,
      main-add-backtrace-crashes-all-and-backtrace-all.patch,
      sessionMode-add-support-for-debugFlags-parameter.patch:
      + Improve debug JS tracing for crash reports
    - st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch:
      + Fix crash on theme changes
    - ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.patch:
      + stop searches when requested from UI
    - magnifier-Show-cursor-when-magnifier-is-enabled-and-scale.patch:
      + Show monitor scaled cursor when magnifier is enabled
    - Break gnome-shell-extension-desktop-icons (<< 19.01.3+git20190814)

  [ Daniel van Vugt ]
  * d/p/ubuntu/keep-ubuntu-logo-bright-lp1867133-v1.patch:
     Stop the Ubuntu logo f...

Read more...

Changed in gnome-shell (Ubuntu):
status: Fix Committed → Fix Released
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.