Skip to content

Draft: set-image-as-wallpaper: use libportal

Vanadiae requested to merge Vanadiae/epiphany:wallpaper_portal into master

Currently, the code that sets an image as wallpaper sets the key in gnome-shell's gsettings, which means this only work for GNOME and it doesn't work at all in flatpaks.

So change to use libportal instead, making this work everywhere, even outside flatpak, because libportal works out of the sandbox as well.


I've never played with libportal nor glib nor async so this is quite new for me but I'm eager to learn and help. Several things will need to be changed (hence why WIP):

  • make the portal accessible in all the program (which probably means in EphyWindow)

  • manage to get this working
    when "set as wallpaper", the image is downloaded with a strange name (the url of the image I think) -> was just the name of my image that was strange

  • discover how does webkit manage to download the image in XDG_IMAGE_DIR although the only part of the host filesystem epiphany has access to is xdg-download.

  • revert !679 (merged) -> only applies to branch gnome-3-36 so no need to do it as not in master

  • remove libportal as dependency (because of !666 (merged))

  • Then finally rebase on upstream/master when all above is ticked

(and in an other MR : add _build to the gitignore since it's the usual name for meson)

Any suggestion is welcome but bear in mind that I'm trying on my own way to learn as well by trying and digging in the documentation.

Edited by Michael Catanzaro

Merge request reports