Agree. And I like the solution proposed by you. In that way, when we have dbus interface defined, we can simply add a script to handle it, such as 00-dbus (which has the highest priority).<br><br><div class="gmail_quote">On Tue, Nov 11, 2008 at 4:20 PM, 洪任諭 <span dir="ltr"><<a href="http://pcman.tw">pcman.tw</a>@<a href="http://gmail.com">gmail.com</a>></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;">Back to the original topic.<br>
We still need a better solution than the current one.<br>
As a application developer, it's a real pain to know that even I call<br>
the 'cross-desktop' xdg-utils, nothing will work if there is no gnome,<br>
kde, or xfce.<br>
For example, if I only use openbox, fluxbox, or icewm, I still have to<br>
have other DEs installed, or at least have their related services<br>
installed. Otherwise nothing will work.<br>
The smallest one of them might be exo-open, which is included in<br>
libexo. But it won't work properly, and cannot be configured without<br>
xfce.<br>
<br>
So the point of my proposal is, xdg-utils should be extensible, not<br>
hard-coded to support gnome, kde, and xfce only. Waiting for patches<br>
from various DEs and adding them to xdg-utils is not an acceptable<br>
solution since there are too many, and xdg-utils can get bloated and<br>
complicated.<br>
<br>
As for dbus, I agree that having dbus services is great, but it should<br>
be optional.<br>
However, even if we have dbus, we still won't know if a application<br>
fail to start or not, unless the services for various desktop<br>
environment support this. For now, the dbus service can call<br>
underlying scripts, or vice versa.<br>
<br>
Another solution will be write a <a href="http://freedesktop.org" target="_blank">freedesktop.org</a> spec and force all<br>
desktop environments to share the same config file for defining<br>
default browser and mail client.<br>
<div><div></div><div class="Wj3C7c"><br>
On Tue, Nov 11, 2008 at 3:58 PM, Zhe Su <<a href="http://james.su" target="_blank">james.su</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>> wrote:<br>
> Having standard dbus interface doesn't mean that those shell scripts must be<br>
> removed. If we have the standard dbus interface, we can modify those scripts<br>
> to use it directly when it's avaiable, and fallback to current solution if<br>
> the dbus service is not available. End users and existing applications won't<br>
> be affected. But newly developed applications can take advantage of the new<br>
> dbus service.<br>
><br>
> Regards<br>
> James Su<br>
><br>
> On Tue, Nov 11, 2008 at 3:36 PM, Peter Åstrand <<a href="mailto:astrand@cendio.se">astrand@cendio.se</a>> wrote:<br>
>><br>
>> On Tue, 11 Nov 2008, Zhe Su wrote:<br>
>><br>
>> > As an application developer, calling a shell script inside an<br>
>> >application to do something is really bad. For example, my application<br>
>> >needs open url or local file by external applications, currently there is<br>
>> >only way to do it: execute xdg-open shell script by using system() or<br>
>> >exec() system call. But this approach has many limitations, such as, it's<br>
>> >impossible to know if and when the application is started successfully.<br>
>><br>
>> 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>
>> "An exit code of 0 indicates success ..."<br>
><br>
> xdg-open's exit code is not reliable. The open operation is actually async,<br>
> returning 0 doesn't mean the operation has finished successfully, it only<br>
> means the corresponding open command exits without error. And with xdg-open<br>
> there is no way for the application to know when the external application is<br>
> successfully started up.<br>
> And it's not guaranteed that xdg-open will run in async mode. It might be<br>
> blocked when calling the real open command until the external application is<br>
> launched successfully. We encountered such issue in one of our application.<br>
><br>
>><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't depend on DBUS.<br>
>><br>
>> Regards,<br>
>> ---<br>
>> Peter Åstrand ThinLinc Chief Developer<br>
>> Cendio AB <a href="http://www.cendio.com" target="_blank">http://www.cendio.com</a><br>
>> Wallenbergs gata 4<br>
>> 583 30 Linköping Phone: +46-13-21 46 00<br>
><br>
</div></div><div><div></div><div class="Wj3C7c">> _______________________________________________<br>
> Portland mailing list<br>
> <a href="mailto:Portland@lists.freedesktop.org">Portland@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/portland" target="_blank">http://lists.freedesktop.org/mailman/listinfo/portland</a><br>
><br>
><br>
_______________________________________________<br>
Portland mailing list<br>
<a href="mailto:Portland@lists.freedesktop.org">Portland@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/portland" target="_blank">http://lists.freedesktop.org/mailman/listinfo/portland</a><br>
</div></div></blockquote></div><br>