Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is this cross-distro, cross-desktop, and cross-package-format? #1

Closed
probonopd opened this issue Jun 20, 2016 · 6 comments
Closed

is this cross-distro, cross-desktop, and cross-package-format? #1

probonopd opened this issue Jun 20, 2016 · 6 comments

Comments

@probonopd
Copy link

probonopd commented Jun 20, 2016

The name "xdg" implies this is a cross-* standard of some sort.

Is it?

  • Is this supposed to end up in every distro (occasionally people a a bit quick to claim such when in fact the proposal has not really been discussed)?
  • Is this supposed to end up in every desktop (e.g., KDE, XFCE, etc.) or is it a GNOME-only thing?
  • Is this supposed to work with different packaging/bundling formats (e.g., Snap Packages and AppImage) as well, or is this purely a Flatpak-only thing?
  • Is this supposed to work with different sandbox/confinement technologies (e.g., Firejail) or is it a Bubblewrap-only thing?

I am a bit confused because on the one hand, "xdg" suggests it has a very wide scope, but then there are files in the source code that suggest it is specific to Flatpak. Please clarify.

@matthiasclasen
Copy link
Contributor

Too many open-ended questions. That's much better discussed in a different channel. As a short answer, it is not really that relevant whats "supposed" to happen. We plan to work on kde backends for the portals too, fwiw.

@alexlarsson
Copy link
Member

cross desktop can mean many things. We will make the interfaces for the desktop portal implementable and usable from both gnome and kde (i.e. any APIs will be at some level a common subset of gtk/qt apis). We will also work on qt and gtk implementations.

Furthermore, we're working with various people, including canonical employees working on snappy so that we can share portals as much as possible with them. It may be the case that some parts of portals need to be per-app-system, but the goal is to at least share the API used by the apps, so that they only have to be modified once.

That said, I don't quite understand how something like AppImage could use a portal infrastructure. AppImage seems very much designed around not needing any runtime support (other than fuse), whereas deeper integration like portals is going to require a certain amount of runtime support on the host. For instance, it definately needs some kind of dbus filter (flatpak uses a userspace proxy).

@probonopd
Copy link
Author

Good points @alexlarsson and thanks for the clarification. One could imagine a system in which any "untrusted" software could be run with low privileges, and use portals to raise privileges where required (independently of any particular packaging or bundling scheme being used). One could see this mainly as a feature of the sandboxing/confinement system (e.g., Bubblewrap, Firejail) rather than any particular packaging or bundling scheme, right?

@alexlarsson
Copy link
Member

The fundamental requirements for portals are two things:
a) Confinement of the app, including some form of dbus filtering (i.e. allowing access to the portal, but not other unconfined dbus services like the portal desktop implementations).
b) The ability of the portal to query the "peer" application id (i.e. desktop file name/dbus name) in a way that is not fakeable for sandboxed apps.

Flatpak uses bubblewrap + a userspace dbus filtering proxy for a, and uses systemd --user to set a cgroup encoding the app id for b.

@matthiasclasen
Copy link
Contributor

Its not just dbus filtering, either. If you can see all of the filesystem, you can just use a filechooser. For a portal system to make sense, the app really needs to be sandboxed.

@matthiasclasen
Copy link
Contributor

I don't think this issue needs to remain open. The questions have been answered as far as possible

agx pushed a commit to agx/xdg-desktop-portal that referenced this issue Dec 20, 2023
Point to the right binary of the portal implementation in the service file
whot added a commit to whot/xdg-desktop-portal that referenced this issue Feb 8, 2024
g_proxy_resolver_get_default() via g_proxy_resolver_gnome_init() fails
hard if the XDG_DATA_DIR isn't set because the GSettings cannot be found:

In particular this statement fails:
   resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);

  (gdb) bt
  #0  0x00007ffff7eb9bef in g_log_structured_array () at /lib64/libglib-2.0.so.0
  flatpak#1  0x00007ffff7eb9edc in g_log_default_handler () at /lib64/libglib-2.0.so.0
  flatpak#2  0x00007ffff7eba180 in g_logv () at /lib64/libglib-2.0.so.0
  flatpak#3  0x00007ffff7eba463 in g_log () at /lib64/libglib-2.0.so.0
  flatpak#4  0x00007ffff7d7b952 in g_settings_set_property () at /lib64/libgio-2.0.so.0
  flatpak#5  0x00007ffff7c4775a in object_set_property () at /lib64/libgobject-2.0.so.0
  flatpak#6  0x00007ffff7c48068 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#7  0x00007ffff7c4a1a3 in g_object_new_valist () at /lib64/libgobject-2.0.so.0
  flatpak#8  0x00007ffff7c4a55f in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#9  0x00007ffff7fb4ac4 in g_proxy_resolver_gnome_init () at /usr/lib64/gio/modules/libgiognomeproxy.so
  flatpak#10 0x00007ffff7c625ea in g_type_create_instance () at /lib64/libgobject-2.0.so.0
  flatpak#11 0x00007ffff7c47fb4 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#12 0x00007ffff7c495d6 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
  flatpak#13 0x00007ffff7c4a581 in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#14 0x00007ffff7d03c6c in try_implementation () at /lib64/libgio-2.0.so.0
  flatpak#15 0x00007ffff7d09e8e in _g_io_module_get_default () at /lib64/libgio-2.0.so.0
  flatpak#16 0x00007ffff7d18d2a in g_proxy_resolver_get_default () at /lib64/libgio-2.0.so.0
  flatpak#17 0x00000000004d4083 in proxy_resolver_init (resolver=0x5a6cc0) at ../src/proxy-resolver.c:99

This causes xdp to abort, it never claims the bus and our tests time
out.
whot added a commit to whot/xdg-desktop-portal that referenced this issue Feb 8, 2024
g_proxy_resolver_get_default() via g_proxy_resolver_gnome_init() fails
hard if the XDG_DATA_DIR isn't set because the GSettings cannot be found:

In particular this statement fails:
   resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);

  (gdb) bt
  #0  0x00007ffff7eb9bef in g_log_structured_array () at /lib64/libglib-2.0.so.0
  flatpak#1  0x00007ffff7eb9edc in g_log_default_handler () at /lib64/libglib-2.0.so.0
  flatpak#2  0x00007ffff7eba180 in g_logv () at /lib64/libglib-2.0.so.0
  flatpak#3  0x00007ffff7eba463 in g_log () at /lib64/libglib-2.0.so.0
  flatpak#4  0x00007ffff7d7b952 in g_settings_set_property () at /lib64/libgio-2.0.so.0
  flatpak#5  0x00007ffff7c4775a in object_set_property () at /lib64/libgobject-2.0.so.0
  flatpak#6  0x00007ffff7c48068 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#7  0x00007ffff7c4a1a3 in g_object_new_valist () at /lib64/libgobject-2.0.so.0
  flatpak#8  0x00007ffff7c4a55f in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#9  0x00007ffff7fb4ac4 in g_proxy_resolver_gnome_init () at /usr/lib64/gio/modules/libgiognomeproxy.so
  flatpak#10 0x00007ffff7c625ea in g_type_create_instance () at /lib64/libgobject-2.0.so.0
  flatpak#11 0x00007ffff7c47fb4 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#12 0x00007ffff7c495d6 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
  flatpak#13 0x00007ffff7c4a581 in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#14 0x00007ffff7d03c6c in try_implementation () at /lib64/libgio-2.0.so.0
  flatpak#15 0x00007ffff7d09e8e in _g_io_module_get_default () at /lib64/libgio-2.0.so.0
  flatpak#16 0x00007ffff7d18d2a in g_proxy_resolver_get_default () at /lib64/libgio-2.0.so.0
  flatpak#17 0x00000000004d4083 in proxy_resolver_init (resolver=0x5a6cc0) at ../src/proxy-resolver.c:99

This causes xdp to abort, it never claims the bus and our tests time
out.
whot added a commit to whot/xdg-desktop-portal that referenced this issue Feb 8, 2024
g_proxy_resolver_get_default() via g_proxy_resolver_gnome_init() fails
hard if the XDG_DATA_DIR isn't set because the GSettings cannot be found:

In particular this statement fails:
   resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);

  (gdb) bt
  #0  0x00007ffff7eb9bef in g_log_structured_array () at /lib64/libglib-2.0.so.0
  flatpak#1  0x00007ffff7eb9edc in g_log_default_handler () at /lib64/libglib-2.0.so.0
  flatpak#2  0x00007ffff7eba180 in g_logv () at /lib64/libglib-2.0.so.0
  flatpak#3  0x00007ffff7eba463 in g_log () at /lib64/libglib-2.0.so.0
  flatpak#4  0x00007ffff7d7b952 in g_settings_set_property () at /lib64/libgio-2.0.so.0
  flatpak#5  0x00007ffff7c4775a in object_set_property () at /lib64/libgobject-2.0.so.0
  flatpak#6  0x00007ffff7c48068 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#7  0x00007ffff7c4a1a3 in g_object_new_valist () at /lib64/libgobject-2.0.so.0
  flatpak#8  0x00007ffff7c4a55f in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#9  0x00007ffff7fb4ac4 in g_proxy_resolver_gnome_init () at /usr/lib64/gio/modules/libgiognomeproxy.so
  flatpak#10 0x00007ffff7c625ea in g_type_create_instance () at /lib64/libgobject-2.0.so.0
  flatpak#11 0x00007ffff7c47fb4 in g_object_new_internal.part () at /lib64/libgobject-2.0.so.0
  flatpak#12 0x00007ffff7c495d6 in g_object_new_with_properties () at /lib64/libgobject-2.0.so.0
  flatpak#13 0x00007ffff7c4a581 in g_object_new () at /lib64/libgobject-2.0.so.0
  flatpak#14 0x00007ffff7d03c6c in try_implementation () at /lib64/libgio-2.0.so.0
  flatpak#15 0x00007ffff7d09e8e in _g_io_module_get_default () at /lib64/libgio-2.0.so.0
  flatpak#16 0x00007ffff7d18d2a in g_proxy_resolver_get_default () at /lib64/libgio-2.0.so.0
  flatpak#17 0x00000000004d4083 in proxy_resolver_init (resolver=0x5a6cc0) at ../src/proxy-resolver.c:99

This causes xdp to abort, it never claims the bus and our tests time
out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants