Hi Didier! Thanks as always for your answer and feedback :) I suspected it and I was taking a look to desktop launcher source code on github, but I didn't have time to test it. One question: Can I create the symblink when the snap application is executed (after installation) via the script that i use to wrap up the launching process or will I have problems to do that because of the confinement?
Best, Eloy 2016-10-24 10:14 GMT+02:00 Didier Roche <didro...@ubuntu.com>: > 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: wallpaperdownloaderversion: "2.2"summary: Download and manage your > favorite wallpapers from the Internetdescription: WallpaperDownloader is a > simple GUI Java based application for downloading and managing wallpapers > from the Internetgrade: stableconfinement: strictapps: 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 > > > -- > Snapcraft mailing list > Snapcraft@lists.snapcraft.io > Modify settings or unsubscribe at: https://lists.ubuntu.com/ > mailman/listinfo/snapcraft > > -- Eloy García Almadén
-- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft