Re: snap and qt

2016-11-30 Thread Didier Roche
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


Re: snap and qt

2016-11-30 Thread Vasilisc

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



Didier, forgive my stupidity. I create test snap
---
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:
  integration:
   plugin: nil
   stage-packages:
- bash
- xdg-utils
--
But I see error message
awk: cannot open /usr/local/share//applications/mimeapps.list 
(Permission denied)
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
x-www-browser: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
firefox: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
iceweasel: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
seamonkey: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
mozilla: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
epiphany: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
konqueror: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
chromium-browser: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
google-chrome: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
www-browser: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
links2: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
elinks: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
links: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
lynx: not found
/snap/test2/x1/usr/bin/xdg-open: 771: /snap/test2/x1/usr/bin/xdg-open: 
w3m: not found

xdg-open: no method available for opening 'http://google.com/'
--
how to do it correctly?

My host system have

snapd-xdg-open:
  Installed: 0.0.0
  Candidate: 0.0.0
  Version table:
 *** 0.0.0 500
500 http://fi.archive.ubuntu.com/ubuntu zesty/universe amd64 
Packages

100 /var/lib/dpkg/status
--
Best regards,
vasilisc

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


Re: snap and qt

2016-11-30 Thread 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


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