Public bug reported:
**Summary**
In Loupe, choosing "Open With…" from the image's right-click menu does
nothing. The app chooser from the OpenURI portal never appears.
**Steps to reproduce**
1. Open any image in Loupe.
2. Right-click the image and choose "Open With…".
**Expected:** The xdg-desktop-portal app chooser opens so you can pick
an application.
**Actual:** Nothing happens. The journal shows AppArmor denying the
portal call:
```
dbus-broker: apparmor="DENIED" operation="dbus_method_call" bus="session"
path="/org/freedesktop/portal/desktop"
interface="org.freedesktop.portal.OpenURI" member="OpenFile" mask="send"
name=":1.45" label="loupe" peer_label="unconfined"
loupe: ERROR loupe::widgets::image_window:582: Could not open image in external
program: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Sender is not
authorized to send message
```
**Cause**
`/etc/apparmor.d/loupe` includes the `dbus-xdg/portal-file-chooser`,
`portal-file-transfer`, `portal-inhibit`, `portal-print`, `portal-
registry`, `portal-request`, `portal-session` and `portal-settings`
abstractions. Nothing allows `org.freedesktop.portal.OpenURI`, and
`abstractions/dbus-xdg/` has no OpenURI abstraction. Loupe uses
`GtkFileLauncher`, which calls `OpenURI.OpenFile` for both "Open With…"
and opening in an external program.
**Suggested fix**
Add a `dbus-xdg/portal-open-uri` abstraction (or an inline rule in the
loupe profile) like this:
```
dbus send
bus=session
path=/org/freedesktop/portal/desktop
interface=org.freedesktop.portal.OpenURI
member={OpenFile,OpenURI,OpenDirectory,SchemeSupported},
```
Other confined GNOME apps that use `GtkFileLauncher` / `GtkUriLauncher`
probably hit the same denial.
** Affects: loupe (Ubuntu)
Importance: Undecided
Status: New
** Affects: loupe (Ubuntu Resolute)
Importance: Undecided
Status: New
** Affects: loupe (Ubuntu Stonking)
Importance: Undecided
Status: New
** Affects: loupe (Ubuntu Tenacious)
Importance: Undecided
Status: New
** Also affects: loupe (Ubuntu Resolute)
Importance: Undecided
Status: New
** Also affects: loupe (Ubuntu Stonking)
Importance: Undecided
Status: New
** Also affects: loupe (Ubuntu Tenacious)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174629
Title:
AppArmor prevents open with which needs OpenURI
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/loupe/+bug/2174629/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs