No such file or directory when try to execute gsettings

Eloy García (PC Actual) eloy.garcia.pca at gmail.com
Tue Aug 30 07:20:25 UTC 2016


Hi all again.

As Sebastian Bacher suggested, I included gsettings binary within my snap
package. This is the snapcraft.yaml file:

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
confinement: strict

apps:
  wallpaperdownloader:
    command: wallpaperdownloader.sh
    plugs: [x11, network-bind, home]

parts:
  # Pulls the code from the original source (master branch)
  wallpaperdownloader:
    plugin: maven
    source: .
    stage-packages:
      - libglib2.0-bin

  # 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: copy
    files:
      wallpaperdownloader.sh: bin/wallpaperdownloader.sh


-------------

Including libglib2.0-bin as stage-package, the application doesn't complain
anymore about "No such file or directoy" because it finds gsettings binary
on stage/usr/bin. Nevertheless, nothing happens when command line
"gsettings set org.gnome.desktop.background picture-uri
file://blablabla.jpg" is executed within the java code. I don't know how to
"link" this command inside the snap with the native "command" and
configuration files outside. The execution of this command should affect to
the native environment and not the snap confinement created I guess, in
order to change the current wallpaper in GNOME 3 or Unity.

Any ideas or suggestions? Thank you very much for your time and effort :)

Best,
Eloy




2016-08-26 11:00 GMT+02:00 Eloy García (PC Actual) <
eloy.garcia.pca at gmail.com>:

> Thank you very much for your quick answer. I want to implement this for
> other desktop environments, so I guess I have to include every binary I
> want to invoke, right?
>
> I'll give it a try. Thanks again!
>
> El 26 ago. 2016 10:26 a. m., "Sebastien Bacher" <seb128 at ubuntu.com>
> escribió:
>
>> Le 26/08/2016 à 07:23, Eloy García (PC Actual) a écrit :
>> > I have tried gsettings and Unity7 interfaces with no luck. i guess is
>> > more a question of executing a program outside the confinment. How
>> > could I do that? Thank you very much!
>>
>> Hey,
>>
>> Using the system command is not allowed but you can include it in your
>> snap and it should work (either copy the binary or stage-packages the deb)
>>
>> Cheers,
>>
>> Sebastien Bacher
>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft at lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>


-- 
Eloy García Almadén
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160830/bb84299a/attachment.html>


More information about the Snapcraft mailing list