Interface connection and hooks

Pawel Stolowski pawel.stolowski at canonical.com
Thu Dec 1 12:13:01 UTC 2016


Yep, Zygmunt is correct about all these aspects.

Cheers,
Pawel


On 01.12.2016 12:32, Zygmunt Krynicki wrote:
>> Wiadomość napisana przez Alberto Mardegan <alberto.mardegan at canonical.com> w dniu 01.12.2016, o godz. 12:29:
>>
>> Hi all!
>>   I've got a few questions about the upcoming interface hooks, to make
>> sure that everything is ready in my project (Unity8's Online Accounts)
>> to migrate our "click hooks" into the interface hooks.
>>
>> So, what follows is my understanding of the situation, and some
>> questions; please comment if I got something wrong. :-)
> I’ll defer corrections to pstolowski who is implementing this feature, but:
>
>> As I understand it, interface hooks will be run when the interface gets
>> connected. Does this mean that for auto-connect interfaces, interface
>> hooks will effectively be run at install time?
> Yes, they will run when the connection is attempted, even if that is an automatic connection.
>
>> I've read that hooks are run with the same confinement as the rest of
>> the commands included in the snap; but what about the environment? Will
>> the XDG_* variables be properly set?
> All the environment will be consistent but see below.
>
>> Will the hook be run as the UNIX user who connected the interface? And
>> if the interface is autoconnected, will the hook be run multiple times
>> under each different user?
> No, they will run as root AFAIK.
>
>> I guess that's enough questions for now :-)
>>
> Best regards
> ZK






More information about the Snapcraft mailing list