Followup of Bug 14277 Currently thunar uses xfce_spawn_on_screen which itself uses g_spawn_async to launch child processes. https://git.xfce.org/xfce/thunar/tree/thunar/thunar-file.c#n1569 (thunar_file_execute) https://git.xfce.org/xfce/libxfce4ui/tree/libxfce4ui/xfce-spawn.c#n319 (xfce_spawn_on_screen_with_child_watch) The idea is to first check if an application has DBusActivatable=true in its desktop file, and activate it via dbus in that case. Like that the process would be placed in their own cgroup.
Check nautilus for a sample implementation !
I think most of the real work for the implementation used by Nautilus is actually GAppInfo, which is in libgio, so you can use a lot of it directly. There might also be helper code in GTK.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/thunar/-/issues/193. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev