Closed hazg closed 2 years ago
I've debugged this. The issue is that these apps are activated via dbus - however, due to lightpad closing immediately after "launching" the application, the dbus activation is not fully started and hence the application does not appear.
What is needed is that lightpad needs to understand about dbusactivatable and wait until the dbus signal appears before closing.
budgie-desktop shows how this could be done
https://github.com/solus-project/budgie-desktop/blob/master/src/rundialog/RunDialog.vala#L197
https://github.com/solus-project/budgie-desktop/blob/master/src/rundialog/RunDialog.vala#L375
https://github.com/solus-project/budgie-desktop/blob/master/src/rundialog/RunDialog.vala#L352
Note - this is a very dirty patch I'm including in our (ubuntu budgie) backports PPA - I won't do a PR because really the code needs proper dbusactivatable handling as outlined above.
From 7b5cd1e35c1a84d8c4aa181f200562a69dcb1a8b Mon Sep 17 00:00:00 2001
From: David Mohammed <fossfreedom@ubuntu.com>
Date: Tue, 28 Dec 2021 15:40:54 +0000
Subject: [PATCH] Hide and delay to enable mainly gnome based apps to launch
---
src/Application.vala | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/Application.vala b/src/Application.vala
index de9ce27..995ce34 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -233,9 +233,16 @@ public class LightPadWindow : Widgets.CompositedWindow {
if (this.filtered.get (app_index)["terminal"] == "true") {
GLib.AppInfo.create_from_commandline (this.filtered.get (app_index)["command"], null, GLib.AppInfoCreateFlags.NEEDS_TERMINAL).launch (null, null);
} else {
- new GLib.DesktopAppInfo.from_filename (this.filtered.get(app_index)["desktop_file"]).launch (null, null);
+ var context = new AppLaunchContext ();
+ new GLib.DesktopAppInfo.from_filename (this.filtered.get(app_index)["desktop_file"]).launch (null, context);
}
- this.destroy ();
+ this.hide();
+ GLib.Timeout.add_seconds (3, () => {
+ // allow some time before quitting to allow dbusactivatable apps to be launched
+ this.destroy ();
+
+ return GLib.Source.REMOVE;
+ });
} catch (GLib.Error e) {
warning ("Error! Load application: " + e.message);
}
--
2.32.0
@fossfreedom thank you for the contribution. I've very busy lately with my main work. I'll try to fix this issue as soon as possible. Regards!
We need investigate in more deep DBus activatable features... thank @fossfreedom for the example code of Budgie Desktop... DBus things will be features for next major release. For now, I implemented you temporary patch. Thank you!
There are no windows in gnome programs. From the terminal everything runs correctly.
I.e. I can see in htop for example that they are running.
dconf-editor, deja-dup, gnome-software for example.
Ubuntu 21.04
im using it by UbuntuBudgie/budgie-lightpad-applet in Budgie
but from terminal - It's OK