Add Picture button in Background does not allow you to select wallpaper

Bug #2065708 reported by Sam Lane
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
budgie-control-center (Ubuntu)
Status tracked in Oracular
Noble
In Progress
Medium
Sam Lane
Oracular
Fix Released
Medium
fossfreedom

Bug Description

[ Impact ]

 * On Ubuntu Budgie 24.04 / 24.10, When trying to select a custom wallpaper to add to the Backgrounds page of Budgie Control Center, the "Add Picture" button will open a dialog to select an image file. However, there will be no thumbnail of the image displayed in this dialog, the "Open" button will remain insensitive, and double-clicking the file name will have no effect. The only option is to cancel out of the dialog. This prevents the user from adding a custom wallpaper. This is due to AppArmor changes preventing certain apps doing deemed security related issues in userspace. In this case libgnome-desktop is calling bwrap which is the deemed culprit.

 * The upload addresses this issue by using GdkPixbuf to create the thumbnail image, instead of gnome-desktop thumbnail creator.

[ Test Plan ]

 To reproduce:

 * On Ubuntu Budgie 24.04/24.10
 * Open Budgie Control Center
 * Navigate to the Background panel
 * Select the "Add Picture" option
 * Select an image file
 * The thumbnail is not updated to show the currently selected image
 * The "Open" button remains inactive, and the only option is to cancel the dialog

 * After this, the proposed fix can be applied.
 * Open Budgie Control Center and repeat the above
 * When a valid image is selected, the thumbnail is now properly shown and the "Open" button is enabled.
 * Open the selected image. The image is now properly added to Budgie Control Center and can selected as a background

[ Where problems could occur ]

  * It is possible that gnome-desktop thumbnail creator provided additional functionality or handled a wider range of images than GdkPixbuf.
  * Mitigating factors are that this is very specific to the Budgie desktop, and it only directly impacts users who set wallpapers. It improves functionality where it is currently not working.

[ Other Info ]

--- Original Report ---

Ubuntu Budgie 24.04
budgie-control-center 1.4.0-2build3

When trying to select a custom wallpaper to add to the Backgrounds page of Budgie Control Center, the "Add Picture" button will open a dialog to select an image file. However, there will be no thumbnail of the image displayed in this dialog, the "Open" button will remain insensitive, and double-clicking the file name will have no effect. The only option is to cancel out of the dialog.

Steps to reproduce:

On Ubuntu Budgie Noble / Oracular:
 - open Budgie Control Center
 - Navigate to the Backgrounds page and click the "Add Picture" button in the top right title bar.
 - When the file chooser dialog opens, select an image file.

What I would expect to happen:

I would expect the thumbnail to update in the lower right, and the "Open" button to become enabled.

What happened instead:

The "Open" button remains disabled, and the thumbnail is shown as a "?".

Additional information:

This is due to AppArmor changes preventing certain apps doing deemed security related issues in userspace.
Running budgie-control-center from the terminal illustrates the issue with thumbnails with the following output:
(budgie-control-center:38170): cc-background-chooser-WARNING **: 12:37:31.144: could not general thumbnail file:///home/sam/Pictures/flavors/Flavor-Ubuntu-Budgie.png (image/png) Child process exited with code 1

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: budgie-control-center 1.4.0-2build3
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: Budgie:GNOME
Date: Tue May 14 12:38:19 2024
InstallationDate: Installed on 2024-05-08 (6 days ago)
InstallationMedia: Ubuntu-Budgie 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
SourcePackage: budgie-control-center
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sam Lane (samlane00) wrote :
Sam Lane (samlane00)
Changed in budgie-control-center (Ubuntu Noble):
assignee: nobody → Sam Lane (samlane00)
Changed in budgie-control-center (Ubuntu Oracular):
assignee: nobody → Sam Lane (samlane00)
Changed in budgie-control-center (Ubuntu Noble):
importance: Undecided → Medium
Changed in budgie-control-center (Ubuntu Oracular):
importance: Undecided → Medium
Changed in budgie-control-center (Ubuntu Oracular):
status: New → Fix Committed
Sam Lane (samlane00)
description: updated
description: updated
Sam Lane (samlane00)
summary: - Add Picture button in does not allow you to select wallpaper
+ Add Picture button in Background does not allow you to select wallpaper
Changed in budgie-control-center (Ubuntu Oracular):
status: Fix Committed → Fix Released
Changed in budgie-control-center (Ubuntu Noble):
status: New → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :

The proposed solution here deals with bubblewrap being broken by apparmor in noble by altogether eliminating the intended security benefits of the bubblewrap sandboxing of the thumbnailer.

I do not think this is an appropriate resolution of this issue. We need to fix bubblewrap to work with current apparmor, not downgrade the security of the desktop in noble.

I have reopened the bubblewrap task on LP: #2046844 and escalated to the AppArmor team.

Revision history for this message
John Johansen (jjohansen) wrote :

Agreed that, we don't want to remove sandboxing on the thumbnailer. We are looking at what we can do for a fix.

Revision history for this message
John Johansen (jjohansen) wrote :

I can report the bwrap-userns-restrict profile in Oneric makes this work for me. This fix migrated out of proposed this week, so it has only been available for a few days.

We will work on getting it SRUed to noble.

Revision history for this message
John Johansen (jjohansen) wrote :

@samlan00:

you should be able to revert your fix on Oneiric.

Revision history for this message
John Johansen (jjohansen) wrote :

Uhmmm sorry Oracular not Oneiric, seems I am a full 13 years out of sync

Revision history for this message
fossfreedom (fossfreedom) wrote :

I presume that this is the apparmor SRU https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2064672

Can confirm that the apparmor changes for oracular work for BCC. I've uploaded to unstable a revert fix.

Lets close this SRU request once the apparmor changes have been evaluated by the SRU team and if content test with them to check noble works without needing this specific update.

Changed in budgie-control-center (Ubuntu Oracular):
status: Fix Released → In Progress
assignee: Sam Lane (samlane00) → fossfreedom (fossfreedom)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package budgie-control-center - 1.4.0-3

---------------
budgie-control-center (1.4.0-3) unstable; urgency=medium

  * Revert addition of patch since apparmor now includes a suitable bwrap
    profile. (LP: #2065708)
    Don-t-use-gnome-desktop-thumbnail-preview-creator.patch

 -- David Mohammed <email address hidden> Thu, 30 May 2024 22:00:05 +0100

Changed in budgie-control-center (Ubuntu Oracular):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Proposed package upload rejected

An upload of budgie-control-center to noble-proposed has been rejected from the upload queue for the following reason: "should be fixed in bubblewrap instead".

Revision history for this message
Chris Halse Rogers (raof) wrote :

An upload of apparmor to noble-proposed has been rejected from the upload queue for the following reason: "dpkg-source: warning: diff 'apparmor-4.0.1/debian/patches/ubuntu/profiles-fix-wike-profile-location-to-apparmor.d.patch' doesn't contain any patch - you can't rename files in a diff!".

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Sam, or anyone else affected,

Accepted apparmor into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apparmor/4.0.1-0ubuntu0.24.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-noble
Revision history for this message
Sam Lane (samlane00) wrote :

Tested this fix on a machine running Ubuntu Budgie 24.04 which currently is experiencing this issue.

Steps taken to test:
 -Installed apparmor from noble-proposed
 -Confirmed version was apparmor_4.0.1-0ubuntu0.24.04.2
 -After installing, opened budgie-control-center
 -Selected the Background page, clicked the "Add Picture" button, and selected a folder containing images
 -Confirmed that when an image was selected, the thumbnail is now properly shown
 -Confirmed that when an image was selected, the Open button was now enabled
 -Clicked the Open button and confirmed the image is now added to the selection of available background images and is now able to be set as the desktop wallpaper

Fix seems to be working as intended. I did not notice any regressions.

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for apparmor has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Robie Basak (racb) wrote :

This change was reverted, so I'm reopening the bug task for Noble. See main tracking bug 2064672 and regression bug 2072811 for details.

Revision history for this message
Robie Basak (racb) wrote :

Confusingly there was no apparmor task previously, but nevertheless the fix in the apparmor package has been reverted because it regressed other unaffected users.

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.