cannot find click application when Exec not in PATH

Bug #1229253 reported by Sergio Schvezov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-mir
Fix Released
High
Gerry Boland
unity8 (Ubuntu)
Invalid
High
Unassigned

Bug Description

From the logs (.cache/upstart/unity8.log)
Can't exec "notes-app": No such file or directory at /usr/sbin/aa-exec line 122.

grep Exec /opt/click.ubuntu.com/.click/users/phablet/com.ubuntu.notes/share/applications/notes-app.desktop
Exec=notes-app

notes-app is in pkgdir

$ cat /opt/click.ubuntu.com/.click/users/phablet/com.ubuntu.notes/notes-app
#!/bin/sh

export QML2_IMPORT_PATH=$(pwd)/usr/lib/arm-linux-gnueabihf/qt5/qml/

[ -d "$QML2_IMPORT_PATH" ] || exit 1

exec qmlscene $@ NotesApp.qml

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: click-apparmor 0.1.9
Uname: Linux 3.4.0-4-manta armv7l
ApportVersion: 2.12.4-0ubuntu1
Architecture: armhf
Date: Mon Sep 23 15:39:07 2013
InstallationDate: Installed on 2013-09-19 (3 days ago)
InstallationMedia: Ubuntu Saucy Salamander (development branch) - armhf (20130919)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: click-apparmor
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

After some conversations with jdstrand on #ubuntu-touch we may have concluded that it's unity8's responsibility to do the right thing (upstart-app-launch already does).

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Two things are happening in this bug:
 * unity8 can't find the 'notes-app' executable
 * the app is using a shell script to launch the app

Unity8, when not using upstart-app-launch, should examine the Path in the .desktop file then do this:
 * cd $PathInDesktopFile
 * export PATH="$PathInDesktopFile:$PATH"

I think the former may already be happening. This mimcs the behavior of upstart-app-launch, which is correct. Please make sure that $PathInDesktopFile does not equal "." when implementing this.

The second thing is that an app should not be using a shell script to launch itself. The notes-app can be updated to use the '-I' option to qmlscene and simply not use the shell script. The works around this specific example, but this bug should be fixed in Unity8 as well for when apps don't use qmlscene, eg compiled code.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This shouldn't be handled in aa-exec-click because the chdir and the adjustment to PATH should happen prior to its invocation.

affects: click-apparmor (Ubuntu) → unity8 (Ubuntu)
summary: - aa-exec does not work when Exec not in PATH
+ cannot find click application when Exec not in PATH
Michał Sawicz (saviq)
Changed in unity-mir:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Gerry Boland (gerboland)
kevin gunn (kgunn72)
Changed in unity-mir:
milestone: none → phone-v1-freeze
Changed in unity8:
milestone: none → phone-v1-freeze
Changed in unity8 (Ubuntu):
milestone: none → ubuntu-13.10
kevin gunn (kgunn72)
Changed in unity8:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Gerry Boland (gerboland) wrote :

Unity-Mir now using upstart-app-launch, so this is fixed

Changed in unity8:
status: Triaged → Invalid
Changed in unity-mir:
status: Triaged → Fix Released
Changed in unity8 (Ubuntu):
status: New → Invalid
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
importance: Undecided → High
no longer affects: unity8
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.