Le 01/12/2016 à 06:20, Vasilisc a écrit :
> 30.11.2016 17:39, Didier Roche пишет:
>> Le 30/11/2016 à 09:29, Vasilisc a écrit :
>>> Hi folks,
>>> please help me.
>>> Qt app can't open folder and/or launch web browser
>>>
>>
>> Hey Vasilisc,
>>
>>> Error message
>>>
>>> virtual bool QGenericUnixServices::openDocument(const QUrl&): Unable
>>> to detect a launcher for 'file:///home/vasilisc/....'
>>>
>>> virtual bool QGenericUnixServices::openUrl(const QUrl&): Unable to
>>> detect a web browser to launch 'http://www......'
>>>
>> The second error message is due to the fact tht xdg-open isn't findable
>> in your snap (Qt is using that helper to open an url). Remember the
>> previous discussions on using xdg-open to transmit browser opened
>> request on the desktop. Add /usr/loca/bin to your $PATH in your snap
>> path, ensure you have the desktop service installed and that should
>> work.
>>
>> Not opening random files on the system is by design, xdg-open filter
>> thoses. You can join the discussion at
>> https://github.com/snapcore/snapd-xdg-open/issues/18.
>>
>> Cheers,
>> Didier
>>
>>
> I found work solution.
>
> name: test2
> version: "2"
> summary: TEst
> description: |
>     TEST
> confinement: strict
> architectures: [amd64]
>
> apps:
>   test2:
>     command: xdg-open "http://google.com/";
>     plugs: [network, network-bind, x11, home, unity7, gsettings]
>
> parts:
>   snapd-xdg-open:
>     source: https://github.com/ubuntu-core/snapd-xdg-open.git
>     plugin: copy
>     files:
>       data/xdg-open: bin/xdg-open
>
>   integration:
>    plugin: nil
>    stage-packages:
>     - bash
> #    - xdg-utils
>
>
That works, or as said, you could just add in a wrapper /usr/local/bin
in your $PATH.

Cheers,
Didier


-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to