Re: detect video player
02.03.2017 03:31, Leo Arias пишет: So, you want to know from the application itself if it's being run from inside a snap, or not? The program (in snap) needs to find a videoplayers in system. For example, vlc come from snap package (location /snap/vlc/current/...), smplayer - from deb package (location /usr/bin/smplayer). How to find available a video players in host system? I don't know if we have something for that, but it certainly seems to be useful. You could check if some of the environment variables are set, but well, of course that can be cheated by exporting the var before running the application. ubuntu@juju-07fb34-remote-devel-0:~$ echo $SNAP ubuntu@juju-07fb34-remote-devel-0:~$ snap run --shell ipfs ubuntu@juju-07fb34-remote-devel-0:/home/ubuntu$ echo $SNAP /snap/ipfs/x1 -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
detect video player
Please give me advice. For example, vlc come from snap package, smplayer from deb package. How correct detect video players from application-in-snap-package? -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: xdg-open doesn't work only in xubuntu (v2)
20.02.2017 16:56, Oliver Grawert пишет: ah, sorry, i was wrong about the $SNAP in the PATH ... i grabbed your example and changed it like: http://paste.ubuntu.com/24033840/ this definitely works on a unity desktop, i am not sure about desktops that deliberately replace xdg-open with something non-standard though (this will likely be fixed by the new implementation that gustavo talked about in the other thread). Thx! Your solution works. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: The situation with xdg-open
20.02.2017 15:32, Gustavo Niemeyer пишет: Hi there, The problem there is that the confined xdg-open currently depends on snapd-xdg-open, which is a server listening on dbus for the calls. We're changing that mechanism in the short term so snapd will implement that logic internally, precisely to remove that extra moving piece and "flakiness". Thank you for the detailed response. How long should I wait? Xubuntu 16.04.2 /snap/myapp/x1/usr/bin/xdg-open: 630: /snap/myapp/x1/usr/bin/xdg-open: exo-open: not found Ubuntu MATE 16.04.2 /snap/test2/x1/usr/bin/xdg-open: 618: /snap/test2/x1/usr/bin/xdg-open: mate-open: not found Kubuntu 16.04.2 /snap/test2/x1/usr/bin/xdg-open: 566: /snap/test2/x1/usr/bin/xdg-open: kde-open5: not found Ubuntu GNOME 16.04.2 xdg-open work fine. Lubuntu 16.04.2 xdg-open work fine. Ubuntu 16.04.2 xdg-open work fine. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io <mailto:Snapcraft@lists.snapcraft.io> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft <https://lists.ubuntu.com/mailman/listinfo/snapcraft> gustavo @ http://niemeyer.net -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: xdg-open doesn't work only in xubuntu (v2)
20.02.2017 14:20, Oliver Grawert пишет: hi, Am Montag, den 20.02.2017, 13:54 +0300 schrieb Vasilisc: I got /snap/test2/x1/command-test2.wrapper: 8: exec: xdg-open: not found do you see: /snap/core/current/usr/local/bin/xdg-open on your system ? you also dont need to ship bash: /snap/core/current/bin/bash ships it ... looks to me like the inclusion of bash might have broken the default PATH, the latest snap-confine should actually make sure that usr/local/bin is in there. ciao oli $ LANG=C ll /snap/core/current/usr/local/bin/ total 1 drwxr-xr-x 2 root root 88 Feb 19 23:50 ./ drwxr-xr-x 10 root root 123 Feb 19 23:50 ../ lrwxrwxrwx 1 root root 6 Feb 19 23:49 apt -> no-apt* lrwxrwxrwx 1 root root 6 Feb 19 23:49 apt-cache -> no-apt* lrwxrwxrwx 1 root root 6 Feb 19 23:49 apt-get -> no-apt* -rwxr-xr-x 1 root root 70 Feb 19 23:49 no-apt* -rwxr-xr-x 1 root root 127 Feb 19 23:49 xdg-open* $ echo $PATH /home/vasilisc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin $ snap list Name Version Rev Developer Notes core 16.04.1 1240 canonical - test2 1x1 - $ test2 /snap/test2/x1/command-test2.wrapper: 8: exec: xdg-open: not found snapcraft.yaml - name: test2 version: "1" 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: - libc6 after: [desktop-gtk2] -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: xdg-open doesn't work only in xubuntu (v2)
20.02.2017 13:34, Oliver Grawert пишет: looks like you explicitly asked for trouble here ... :) adding xdg-open (via xdg-utils) will replace/override the xdg-open that is already shipped in the core snap (which is a dbus service that hands the url to the outside of the confined space). first of all drop the xdg-utils line above and see if it works then, this should at least allow the app to hand it to the outside of the confined area. that said, it might be that snapd-xdg-open needs to learn about exo- open (or the other way around) as well to be able to handle the request on the desktop side ... without xdg-utils == name: test2 version: "1" 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 after: [desktop-gtk2] I got /snap/test2/x1/command-test2.wrapper: 8: exec: xdg-open: not found -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
The situation with xdg-open
Snapcraft.yaml - name: test2 version: "1" 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 after: [desktop-gtk2] - Results Xubuntu 16.04.2 /snap/myapp/x1/usr/bin/xdg-open: 630: /snap/myapp/x1/usr/bin/xdg-open: exo-open: not found Ubuntu MATE 16.04.2 /snap/test2/x1/usr/bin/xdg-open: 618: /snap/test2/x1/usr/bin/xdg-open: mate-open: not found Kubuntu 16.04.2 /snap/test2/x1/usr/bin/xdg-open: 566: /snap/test2/x1/usr/bin/xdg-open: kde-open5: not found Ubuntu GNOME 16.04.2 xdg-open work fine. Lubuntu 16.04.2 xdg-open work fine. Ubuntu 16.04.2 xdg-open work fine. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
xdg-open doesn't work only in xubuntu
This test case does not work in Xubuntu. - name: test2 version: "1" 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 after: [desktop-gtk2] - Output $ test2 /snap/test2/x1/usr/bin/xdg-open: 630: /snap/test2/x1/usr/bin/xdg-open: exo-open: not found System info: $ LANG=C sudo apt policy xfce4 xfce4: Installed: (none) Candidate: 4.12.2 Version table: 4.12.2 500 500 http://ru.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages 500 http://ru.archive.ubuntu.com/ubuntu xenial/universe i386 Packages $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 16.04.2 LTS Release:16.04 Codename: xenial $ LANG=C sudo apt policy exo-utils exo-utils: Installed: 0.10.7-1 Candidate: 0.10.7-1 Version table: *** 0.10.7-1 500 500 http://ru.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages 100 /var/lib/dpkg/status $ whereis exo-open exo-open: /usr/bin/exo-open /usr/share/man/man1/exo-open.1.gz I found this bug https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1535471 but there is no solution -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
only english UI
If you install vlc in snap package, then see only English interface. # snap find vlc Name Version Developer Notes Summary vlc dailyvideolan - The ultimate media player I try to pack the player-vlc-based and too I fail. Earlier I was helped by these lines, but not now #= export I18NPATH=$SNAP/usr/share/i18n export LOCPATH=$SNAP_USER_COMMON export LC_ALL=$LANG LANG1=$(echo $LANG | cut -f1 -d.) ENC=UTF-8 LOC="$LANG" # generate a locale so we get properly working charsets and graphics if [ ! -e $SNAP_USER_COMMON/$LOC ]; then $SNAP/usr/bin/localedef --prefix=$SNAP_USER_COMMON -f $ENC -i $LANG1 $SNAP_USER_COMMON/$LOC fi #= -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
vlc mpris
How to allow vlc - "org.mpris.MediaPlayer2.vlc.instance*" ??? [0xd5f358] dbus interface error: Error requesting service name org.mpris.MediaPlayer2.vlc.instance3045: Connection ":1.69" is not allowed to own the service "org.mpris.MediaPlayer2.vlc.instance3045" due to AppArmor policy -- I don't see interfaces dbus|mpris # LANG=C apt policy snapd snapd: Installed: 2.21 Candidate: 2.21 Version table: *** 2.21 500 500 http://fi.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.0.2 500 500 http://fi.archive.ubuntu.com/ubuntu xenial/main amd64 Packages # snap interfaces | grep -E "(dbus|mpris)" # -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
start engine before client
The program "app1" is not mine. It consists of two parts. I create snapcraft.yaml apps: engine: command: $SNAP/opt/app1/engine --start plugs: [home, unity7, x11, pulseaudio, network, network-bind] player: command: $SNAP/opt/app1/player "$@" plugs: [home, unity7, x11, pulseaudio, network, network-bind] If to launch an engine (app1.engine) and then the client (app1.player), then everything works perfectly. How to make that start of the client automatically launched an engine? Sorry for my english. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
LibreOffice in snap can't open file
Uh, if path contain non-English characters than LO can't open file. http://imgur.com/a/VdhwV -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: my qt app hello-world
02.02.2017 16:07, Sergio Schvezov пишет: On Thu, 2 Feb 2017 15:53:33 +0300, Vasilisc wrote: Please, help me. I have qt-app HelloWorld. I create HelloWorld in QtCreator. /sp/qt1/ $ tree qtprogram1 qtprogram1 ├── qt1 │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── qt1.pro │ └── qt1.pro.user └── qt1-build-desktop ├── Makefile ├── moc_mainwindow.cpp └── ui_mainwindow.h 2 directories, 9 files --- snapcraft.yaml contain name: qt1 version: "1" summary: My first Qt app description: Qt Hello World confinement: strict architectures: [amd64] apps: qt1: command: desktop-launch $SNAP/opt/myapp/qt1 plugs: [home, unity7, x11] parts: project-files: plugin: qmake source: . qt-version: qt5 project-files: [qtprogram1/qt1/qt1.pro] after: [integration] integration: plugin: nil stage-packages: - libc6 - libstdc++6 - libc-bin after: [desktop-qt5] --- After "snapcraft" I find only one binary file qt1 /sp/qt1# find . -name "qt1" -type f ./parts/project-files/build/qt1 How to locate qt1 in opt/myapp/qt1 (for example)? The best approach is to make qtprogram1/qt1/qt1.pro do that. If you want snapcraft to do this you can use `organize` such that... parts: project-files: plugin: qmake source: . qt-version: qt5 project-files: [qtprogram1/qt1/qt1.pro] organize: qt1: opt/myapp/qt1 after: [integration] But give our result in `find` you have no install rule at all so instead would need to do something like: parts: project-files: plugin: qmake source: . qt-version: qt5 project-files: [qtprogram1/qt1/qt1.pro] install: | install -d $SNAPCRAFT_PART_INSTALL/opt/myapp install qt1 $SNAPCRAFT_PART_INSTALL/opt/myapp/qt1 after: [integration] More about this here https://snapcraft.io/docs/build-snaps/scriptlets Sergio, thank you very much! It's work! =) thx thx thx -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
my qt app hello-world
Please, help me. I have qt-app HelloWorld. I create HelloWorld in QtCreator. /sp/qt1/ $ tree qtprogram1 qtprogram1 ├── qt1 │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── qt1.pro │ └── qt1.pro.user └── qt1-build-desktop ├── Makefile ├── moc_mainwindow.cpp └── ui_mainwindow.h 2 directories, 9 files --- snapcraft.yaml contain name: qt1 version: "1" summary: My first Qt app description: Qt Hello World confinement: strict architectures: [amd64] apps: qt1: command: desktop-launch $SNAP/opt/myapp/qt1 plugs: [home, unity7, x11] parts: project-files: plugin: qmake source: . qt-version: qt5 project-files: [qtprogram1/qt1/qt1.pro] after: [integration] integration: plugin: nil stage-packages: - libc6 - libstdc++6 - libc-bin after: [desktop-qt5] --- After "snapcraft" I find only one binary file qt1 /sp/qt1# find . -name "qt1" -type f ./parts/project-files/build/qt1 How to locate qt1 in opt/myapp/qt1 (for example)? -- 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
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
snap and /etc/termcap
Guru, please help me. App in snap uses GTK/Perl/VTE (Terminal emulator widget - libvte9) In snapcraft.yaml --- integration: plugin: nil stage-packages: - libvte9 - libvte-common - libvte-2.91-common --- VTE try open system file /etc/termcap and 1) if file not exist OR 2) if apparmor cannot allow access I got the problem "*** VTE ***: Failed to load terminal capabilities from '/etc/termcap I cannot press functional key, Enter ... I see in /var/log/syslog Nov 22 14:08:15 vb kernel: [16287.624094] audit: type=1400 audit(1479812895.462:4889): apparmor="DENIED" operation="open" profile="snap.pac.pac" name="/etc/termcap" pid=13542 comm="pac" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0 I found in source code vte http://packages.ubuntu.com/xenial/libvte9 -> http://archive.ubuntu.com/ubuntu/pool/main/v/vte/vte_0.28.2.orig.tar.xz commit 2b6cff9bfeb5ab13cc519abc45a15d9ad58948c0 Author: Nalin Dahyabhai <na...@src.gnome.org> Date: Thu Aug 8 02:26:11 2002 + * src/interpret.c: look for $pkgdatadir/termcap/$TERM first, as the widget does, before consulting /etc/termcap. - But I do not understand what I should do In my wrapper script run.sh I tried redefine some variables, but problem still alive. -- if [ ! -e "$SNAP_USER_DATA/.terminfo" ]; then mkdir -p "$SNAP_USER_DATA/.terminfo" export TERMINFO="$SNAP_USER_DATA/.terminfo" export TERMINFO_DIRS="$SNAP_USER_DATA/.terminfo" tic $SNAP/opt/pac/res/termcap echo "export TERMINFO=$SNAP_USER_DATA/.terminfo" > "$SNAP_USER_DATA/.bashrc" echo "export TERMINFO_DIRS=$SNAP_USER_DATA/.terminfo" >> "$SNAP_USER_DATA/.bashrc" fi export TERMINFO="$SNAP_USER_DATA/.terminfo" export TERMINFO_DIRS="$SNAP_USER_DATA/.terminfo" export TERMCAP="$SNAP/usr/share/terminfo/x/xterm+256color" --- Sorry for my english. Help me please. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: .desktop files for app-in-snap
08.08.2016 11:13, Eloy García (PC Actual) пишет: Hi! You can take a loot at snappy playpen github repository. There is an application (wallpaperdownloader) that it is java-based and it has a desktop icon working fine. This is the URL: https://github.com/ubuntu/snappy-playpen Best wishes! El 8 ago. 2016 9:46 a. m., "Didier Roche" <didro...@ubuntu.com <mailto:didro...@ubuntu.com>> escribió: > Le 08/08/2016 à 08:47, Vasilisc a écrit : > 08.08.2016 08:50, Didier Roche пишет: >> Le 06/08/2016 à 09:47, Vasilisc a écrit : >>>> Please help me. If I launch the program in the Terminal - well done, >>>> but >>>> I can't start program from Unity Launcher. >>>> >>>> I tried to change parameter Exec in >>>> ~/.local/share/applications/app.desktop >>>> Exec=app-name >>>> Exec=snap-name.app-name >>>> Exec=$SNAP/usr/bin/start-script.sh >>>> Exec=$snap.$app (http://snapcraft.io/docs/snaps/structure) >>>> >>>> and studied case https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop <https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop> >>>> >>>> >>>> >>>> but it didn't help. >>>> >>> suspect lines >>> Aug 6 10:20:35 vb gnome-session[2377]: (gnome-software:2582): >>> As-WARNING **: failed to rescan: Failed to parse >>> /home/vasilisc/.local/share/applications/org-languagetool-gui-main.desktop >>> >>> file: cannot process file of type application/x-desktop >>> >>> >> Hey Vasilisc, >> >> You didn't provide your .desktop file in setup/gui/ directory. Do you >> mind doing this? >> I suspect your type is different from "Type=Application", which it >> should be. >> Didier > > I found a problem. My script-wrapper (usr/bin/run.sh) run java app > #!/bin/bash > bla-bla-bla > java -jar -Duser.home=$SNAP_USER_DATA $SNAP/usr/bin/languagetool.jar > > in snapcraft.yaml > apps: > languagetool: > command: usr/bin/run.sh > plugs: [network, network-bind, x11, home, unity7] > > > If to attach the java-app to a panel Unity Launcher, then the file > (~/.local/shape/applications/org-languagetool-gui-main.desktop ) will > contain. > > [Desktop Entry] > Encoding=UTF-8 > Version=1.0 > Type=Application > Name=LanguageTool 3.4-SNAPSHOT > Icon=org-languagetool-gui-main > Exec=java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1 > /snap/languagetool/x1/usr/bin/languagetool.jar > > In a host-system can't execute a command (it's impossible) > java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1 > /snap/languagetool/x1/usr/bin/languagetool.jar > > I don't know what to do. You need to ship yourself your .desktop file, as you pointed via the vlc desktop file inside the snapcraft source. This one will have the correct Exec= after building it with snapcraft rather then one generated from unity. -- Snapcraft mailing list Snapcraft@lists.snapcraft.io <mailto:Snapcraft@lists.snapcraft.io> Modify settings or unsubscribe at:https://lists.ubuntu.com/mailman/listinfo/snapcraft <https://lists.ubuntu.com/mailman/listinfo/snapcraft> 0) snap install wallpaperdownloader 81.81 MB / 81.84 MB [=====>_] 99.97 % 1.74 MB/s wallpaperdownloader (stable) 2.1 from 'egarcia' installed 1) Run java-app wallpaperdownloader in Terminal or Alt+F2 2) To attach the program on a panel Unity. 3) cat .local/share/applications/es-estoes-wallpaperdownloader-main.desktop [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=WallpaperDownloader V2.1 Icon=es-estoes-wallpaperdownloader-main.png Exec=java -jar -Duser.home=/home/vasilisc/snap/wallpaperdownloader/3 /snap/wallpaperdownloader/3/jar/wallpaperdownloader.jar StartupNotify=false StartupWMClass=es-estoes-wallpaperDownloader-Main OnlyShowIn=Unity; X-UnityGenerated=true - "Exec=java -jar -Duser.home=/home/vasilisc/snap/wallpaperdownloader/3 /snap/wallpaperdownloader/3/jar/wallpaperdownloader.jar" If Java is not installed on your system, then you have a problem. "Exec=java" - It's not right. For example, my script-wrapper can do the useful steps BEFORE start of the java program. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
Re: .desktop files for app-in-snap
08.08.2016 08:50, Didier Roche пишет: Le 06/08/2016 à 09:47, Vasilisc a écrit : Please help me. If I launch the program in the Terminal - well done, but I can't start program from Unity Launcher. I tried to change parameter Exec in ~/.local/share/applications/app.desktop Exec=app-name Exec=snap-name.app-name Exec=$SNAP/usr/bin/start-script.sh Exec=$snap.$app (http://snapcraft.io/docs/snaps/structure) and studied case https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop but it didn't help. suspect lines Aug 6 10:20:35 vb gnome-session[2377]: (gnome-software:2582): As-WARNING **: failed to rescan: Failed to parse /home/vasilisc/.local/share/applications/org-languagetool-gui-main.desktop file: cannot process file of type application/x-desktop Hey Vasilisc, You didn't provide your .desktop file in setup/gui/ directory. Do you mind doing this? I suspect your type is different from "Type=Application", which it should be. Didier I found a problem. My script-wrapper (usr/bin/run.sh) run java app #!/bin/bash bla-bla-bla java -jar -Duser.home=$SNAP_USER_DATA $SNAP/usr/bin/languagetool.jar in snapcraft.yaml apps: languagetool: command: usr/bin/run.sh plugs: [network, network-bind, x11, home, unity7] If to attach the java-app to a panel Unity Launcher, then the file (~/.local/shape/applications/org-languagetool-gui-main.desktop ) will contain. [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=LanguageTool 3.4-SNAPSHOT Icon=org-languagetool-gui-main Exec=java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1 /snap/languagetool/x1/usr/bin/languagetool.jar In a host-system can't execute a command (it's impossible) java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1 /snap/languagetool/x1/usr/bin/languagetool.jar I don't know what to do. -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
analog sed
AppArmor not allowed "sed -i". how to find and replace substring? -- syscall 93 scmp_sys_resolver 93 (fchown) https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1581310 -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft
SNAP_USER_COMMON
test snap raise error - echo "Writing to $SNAP_USER_COMMON" mkdir -p $SNAP_USER_COMMON/platform echo "hello common" > $SNAP_USER_COMMON/common.txt -- grep -F audit syslog Aug 2 08:34:16 vb kernel: [ 2622.276193] audit: type=1400 audit(1470116056.762:34): apparmor="ALLOWED" operation="mkdir" profile="snap.test2.test2" name="/home/vasilisc/snap/test2/common/" pid=4971 comm="mkdir" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000 --- I readed https://askubuntu.com/questions/762354/where-can-ubuntu-snaps-write-data https://github.com/snapcore/snapd/pull/1396 How it is correct to use a variable SNAP_USER_COMMON from snap package? -- Best regards, vasilisc -- Snapcraft mailing list Snapcraft@lists.snapcraft.io Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/snapcraft