The title says it all, but the background is that there are currently several bugs against the SDK regarding non-app-specific paths being used by applications (eg, bug #1197051, bug #1197056, bug #1224126). This is going to be solved by the SDK examining applicationName in the MainView and appending that to QStandardPaths, which will work with application confinement since it uses apparmor rules like the following:
@{APP_PKGNAME}="ar.com.beuno.hello-world"
...
owner @{HOME}/.cache/@{APP_PKGNAME}/ rw, # subdir of XDG_CACHE_HOME
owner @{HOME}/.cache/@{APP_PKGNAME}/** mrwkl,
owner @{HOME}/.config/@{APP_PKGNAME}/ rw, # subdir of XDG_CONFIG_HOME
owner @{HOME}/.config/@{APP_PKGNAME}/** mrwkl,
owner @{HOME}/.local/share/@{APP_PKGNAME}/ rw, # subdir of XDG_DATA_HOME
owner @{HOME}/.local/share/@{APP_PKGNAME}/** mrwklix,
owner /{,var/}run/user/*/confined/@{APP_PKGNAME}/ rw, # subdir of XDG_RUNTIME_DIR
owner /{,var/}run/user/*/confined/@{APP_PKGNAME}/** mrwkl,
APP_PKGNAME is set by the click-apparmor hook and it corresponds to the "name" field in the click manifest.
Right now when creating a new application, it creates this in the qml:
// Note! applicationName needs to match the .desktop filename
applicationName: "untitled2"
and this in the click manifest (click the Packaging button on the left and then click the Manifest tab):
"name": "com.ubuntu.developer.jdstrand.untitled2",
The SDK should be updated to use this in the QML:
// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer.jdstrand.untitled2"
This should be done for all Ubuntu templates that currently set 'applicationName'.
Ideally, the SDK would warn in the 'Application Output' of qtcreator when applicationName != click manifest name when the app has a click manifest. This will help developers discover problems.
The title says it all, but the background is that there are currently several bugs against the SDK regarding non-app-specific paths being used by applications (eg, bug #1197051, bug #1197056, bug #1224126). This is going to be solved by the SDK examining applicationName in the MainView and appending that to QStandardPaths, which will work with application confinement since it uses apparmor rules like the following: ="ar.com. beuno.hello- world" /.cache/ @{APP_PKGNAME} / rw, # subdir of XDG_CACHE_HOME /.cache/ @{APP_PKGNAME} /** mrwkl, /.config/ @{APP_PKGNAME} / rw, # subdir of XDG_CONFIG_HOME /.config/ @{APP_PKGNAME} /** mrwkl, /.local/ share/@ {APP_PKGNAME} / rw, # subdir of XDG_DATA_HOME /.local/ share/@ {APP_PKGNAME} /** mrwklix, }run/user/ */confined/ @{APP_PKGNAME} / rw, # subdir of XDG_RUNTIME_DIR }run/user/ */confined/ @{APP_PKGNAME} /** mrwkl,
@{APP_PKGNAME}
...
owner @{HOME}
owner @{HOME}
owner @{HOME}
owner @{HOME}
owner @{HOME}
owner @{HOME}
owner /{,var/
owner /{,var/
APP_PKGNAME is set by the click-apparmor hook and it corresponds to the "name" field in the click manifest.
Right now when creating a new application, it creates this in the qml: Name: "untitled2"
// Note! applicationName needs to match the .desktop filename
application
and this in the click manifest (click the Packaging button on the left and then click the Manifest tab): developer. jdstrand. untitled2" ,
"name": "com.ubuntu.
The SDK should be updated to use this in the QML: Name: "com.ubuntu. developer. jdstrand. untitled2"
// Note! applicationName needs to match the "name" field of the click manifest
application
This should be done for all Ubuntu templates that currently set 'applicationName'.
Ideally, the SDK would warn in the 'Application Output' of qtcreator when applicationName != click manifest name when the app has a click manifest. This will help developers discover problems.