snap integration with XFCE

Didier Roche didrocks at ubuntu.com
Mon Oct 24 08:14:01 UTC 2016


Le 06/10/2016 à 21:34, Eloy García (PC Actual) a écrit :
> Hi all.
>
> I develop a java-based application to download and manage wallpapers
> from the Internet (wallpaperdownloader)
> (https://bitbucket.org/eloy_garcia_pca/wallpaperdownloader/overview).
> The applications is in the store but now I'm trying to integrate XFCE
> desktop too. I mean, now you can set any wallpaper downloaded directly
> from the GUI and it is working fine for GNOME 3, Unity and MATE. All
> three of them use gsettings interface and desktop-gtk3 wrapper part as
> you can see in the snapcraft.yaml:
>
> name: wallpaperdownloader
> version: "2.2"
> summary: Download and manage your favorite wallpapers from the Internet
> description: WallpaperDownloader is a simple GUI Java based application for
> downloading and managing wallpapers from the Internet
> grade: stable
> confinement: strict
>
> apps:
>   wallpaperdownloader:
>     command: wallpaperdownloader.sh
>     plugs: [x11, network-bind, home, gsettings]
>
> parts:
>   # Pulls the code from the original source (master branch)
>   # desktop/gtk3 is a snapcraft part (snapcraft-desktop-helpers) from
> the Wiki: https://wiki.ubuntu.com/snapcraft/parts
>   # It enables desktop integration and gsettings manipulation from the
> confined application
>   # It is necessary to use gsettings interface (see above) in order to
> have a fully functional
>   # desktop/gtk3 part
>   # Github repository for snapcraft-desktop-helpers:
> https://github.com/ubuntu/snapcraft-desktop-helpers
>   wallpaperdownloader:
>     plugin: maven
>     source: ..
>     stage-packages:
>       # mate-desktop-common is necessary to have MATE gsettings schemas
> available for the application
>       - mate-desktop-common
>     after: [desktop/gtk3]
>
>   # It will copy wallpaperdownloader script into /bin/
>   # This script contains all the commands needed (sets env variables,
> launches the jar file...) to
>   # execute the application
>   exec:
>     plugin: dump
>     source: scripts
> Now, if XFCE desktop is detected by the application, the command run
> inthe background is 'xfconf-query --channel xfce4-desktop --property
> /backdrop/screen0/monitor0/workspace0/last-image --set wallpaper.jpg'.
> If the application runs natively, there is no problem and the
> wallpaper is set properly. But when I test the snap package built,
> this is the error thrown:
>
> ERROR LinuxWallpaperChanger:188 - Property
> "/backdrop/screen0/monitor0/workspace0/last-image" does not exist on
> channel "xfce4-desktop". If a new property should be created, use the
> --create option.
>
> I have included xfconf as stage-package and the command xfconf-query
> is found within the snap. Could you give me a hint to solve this problem?
>
> Thank you very much for your time and your help :)

Hey Eloy,

I'm not a xfconf user and so can't answer to you precisly. However, my
guess is that you will need a file (like the dconf one we are using in
GNOME/Unity environment) shared between your user's settings and the
snap writable path.
The desktop launcher is creating a symlink (accessed via the home
interface) between the main user's dconf/user file to path of the snap
writable path, to be able to read the value. The gsettings interfaces
give, on its side, access to the dbus call for this.

I wonder if the unaccessible file/dbus property could trigger this error
fallback in xfconf, and hence, prints that message.

I hope this helps!
Cheers,
Didier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161024/a5bd62e1/attachment.html>


More information about the Snapcraft mailing list