Ok, I'll try to summarize what I've seen. * When compiled with dbus support, xfrun adds a dbus service org.xfce.RunDialog. * When called, xfrun sends a dbus command OpenDialog to org.xfce.RunDialog * if xfrun4 is already running ** it receives the message and display the run dialog ** one type a command ** the command gets executed with the environment of the xfrun daemon * else ** dbus sees that a message to org.xfce.RunDialog is sent and there's no receiver ** dbus runs the service using the Exec= line (which is xfrun4 --daemon) ** the xfrun4 daemon is run from dbus ** the xfrun4 daemon receives the OpenDialog command ** the xfrun4 daemon displays the run dialog ** one types a command ** the command gets executed with the environment of the xfrun daemon In the latter case, the environment is the one from dbus, which is started *before* anything else in the session, and especially before the session manager. Which means the xfrun daemon is not aware of the session management, and so anything run from it won't be registered in the session. I'm not too sure how to fix that. The fact that sending a dbus message is enough to run the daemon and show the popup is nice, that means we don't have to have the daemon running at all time. But that means we won't be able to register anything to the session, unless there's a way to “pass” the environment to the dbus process. As the daemon doesn't time out anyway, it might be a good idea to start it as part of the session, so it gets the correct environment variable Regards, -- Yves-Alexis
We could easily send a copy of the instance's envp to the daemon, that might also be the best solution since it will always pick up the latest changes.
(In reply to comment #1) > We could easily send a copy of the instance's envp to the daemon, that might > also be the best solution since it will always pick up the latest changes. Oh yes, that's quite sensible too. It's not too large to be sent on the bus? Nor to sensitive?
Nah you won't notice the slowdown, not that many strings.
Created attachment 3253 send environ over dbus Could you try the attached patch?
(In reply to comment #4) > Created attachment 3253 > send environ over dbus > > Could you try the attached patch? Didn't you forgot to initialize envp in xfrun_show_dialog()?
Created attachment 3257 Another try Argh, yeah stupid, I changed the environ detect in the last minute and swapped the calls. This patch should be correct.
Should also fix the environment typo in the function name when I apply the patch.
Works fine. Which typo?
Applied in 32f1bfe.
*** Bug 6178 has been marked as a duplicate of this bug. ***