Having standard dbus interface doesn&#39;t mean that those shell scripts must be removed. If we have the standard dbus interface, we can modify those scripts to use it directly when it&#39;s avaiable, and fallback to current solution if the dbus service is not available. End users and existing applications won&#39;t be affected. But newly developed applications can take advantage of the new dbus service.<br>
<br>Regards<br>James Su<br><br><div class="gmail_quote">On Tue, Nov 11, 2008 at 3:36 PM, Peter Åstrand <span dir="ltr">&lt;<a href="mailto:astrand@cendio.se">astrand@cendio.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, 11 Nov 2008, Zhe Su wrote:<br>
<br>
&gt; As an application developer, calling a shell script inside an<br>
&gt;application to do something is really bad. For example, my application<br>
&gt;needs open url or local file by external applications, currently there is<br>
&gt;only way to do it: execute xdg-open shell script by using system() or<br>
&gt;exec() system call. But this approach has many limitations, such as, it&#39;s<br>
&gt;impossible to know if and when the application is started successfully.<br>
<br>
</div>I disagree. Calling an external program is an easy and universal solution.<br>
The return value from xdg-open indicates errors. From the man page:<br>
<br>
&quot;An exit code of 0 indicates success ...&quot;&nbsp;</blockquote><div>xdg-open&#39;s exit code is not reliable. The open operation is actually async, returning 0 doesn&#39;t mean the operation has finished successfully, it only means the corresponding open command exits without error. And with xdg-open there is no way for the application to know when the external application is successfully started up.<br>
And it&#39;s not guaranteed that xdg-open will run in async mode. It might be blocked when calling the real open command until the external application is launched successfully. We encountered such issue in one of our application.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
The whole point of xdg-utils is that it should cover different<br>
desktop environments. We should support current and future non-DBUS<br>
environments, so xdg-utils itself shouldn&#39;t depend on DBUS.<br>
<br>
Regards,<br>
---<br>
<font color="#888888">Peter Åstrand &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ThinLinc Chief Developer<br>
Cendio AB &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.cendio.com" target="_blank">http://www.cendio.com</a><br>
Wallenbergs gata 4<br>
583 30 Linköping &nbsp; &nbsp; &nbsp; &nbsp;Phone: +46-13-21 46 00</font></blockquote></div><br>