snap and qt
Vasilisc
vasilisc777 at gmail.com
Thu Dec 1 05:14:15 UTC 2016
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
More information about the Snapcraft
mailing list