I&#39;m wondering if it&#39;s possible to design a set of standard dbus interface for xdg-utils, then different desktop environments can implement their own dbus services to provide identical functionalities through dbus interface.<br>
<br>Regards<br>James Su<br><br><div class="gmail_quote">On Tue, Nov 11, 2008 at 12:13 PM, 洪任諭 <span dir="ltr">&lt;<a href="http://pcman.tw">pcman.tw</a>@<a href="http://gmail.com">gmail.com</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;">
Hello the authors/maintainers of xdg-utils,<br>
I&#39;m the lead developer of LXDE. &lt; <a href="http://lxde.org/" target="_blank">http://lxde.org/</a> &gt;<br>
I have some thoughts regarding to some limitations of current xdg-utils.<br>
Here are some proposals to rework it and make it totally extensible.<br>
<br>
Limitations of current implementation:<br>
1. It only recognize gnome, xfce, and kde and is far from being truely<br>
cross-desktop.<br>
2. Authors of new desktop environment need to hack xdg-utils to support their<br>
desktop environments, and hope someday Portland project will include<br>
their patch.<br>
3. The number of desktop environments is still increasing, and in this way,<br>
xdg-utils will finally become very complicated and full of dirty hacks.<br>
4. Even if I only get xfce installed on my distro, xdg-utils still<br>
needs to check all the others.<br>
5. Portland project is hard to participate. I sent mails to the<br>
mailing list, and they just got ignored.<br>
<br>
Easy and backward-compatible solution for all the preceding problems -<br>
Let desktop environments install their own scripts.<br>
<br>
Implementation Details (Advantages and disadvantages are listed later<br>
in this mail)<br>
Taking xdg-utils for example, it should work like this:<br>
<br>
Looking for scripts in &quot;/usr/share/xdg-utils/xdg-open.d&quot; (or other<br>
places are ok).<br>
Scripts from various desktop environments can be installed there.<br>
50-gnome<br>
50-kde<br>
60-kde3<br>
50-xfce<br>
99-generic<br>
The numbers means &quot;priority&quot;. The generic one, of course, has the<br>
lowest priority.<br>
This is common practice on UNIX systems.<br>
Then, run the scripts installed by various desktop environments one by one.<br>
Every script in that dir checks if current desktop session is theirs.<br>
If it is, the script opens the file/url with their own mechanism, and returns 0.<br>
Otherwise, it returns an error codes.<br>
Once failed, the next script with lower priority will be tried.<br>
<br>
Advantages:<br>
1. Highly extensible.<br>
2. Won&#39;t break any compatibility with current implementation.<br>
3. Easy to maintain. (The scripts are all maintained by authors from<br>
respective desktop environments, not you guys from Portland)<br>
It&#39;s impossible for Portland developers to maintain hacks for all kinds of<br>
desktop environment and constantly fix them for future versions of those<br>
desktop environment. It&#39;s quite inefficient and hard to get things right.<br>
4. Don&#39;t need to hard code detection for all kinds of desktop<br>
environments in one<br>
very large and complicated xdg-* script.<br>
5. Only the desktop environments *really* installed on the system are<br>
checked since those scripts are provided by the DEs themselves. So you&#39;ll<br>
never always try to find gnome or kde, like the current xdg-utils,<br>
even if they are not installed.<br>
<br>
Disadvantages:<br>
1. The performance is slightly worse. (Since this command won&#39;t be<br>
executed continuously in a large loop, it&#39;s not a real issue.)<br>
2. Potential conflicts between scripts installed by various desktops.<br>
(This is not possible if those scripts are well-written)<br>
<br>
For xdg-mime and others, the same method can be used.<br>
<br>
This can solve all of the problems in current implementation.<br>
Any comments? Is it possible to get this new design into Portland xdg-utils?<br>
<br>
Thank you all in advance.<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>
</blockquote></div><br>