Proposal: Inharitance for Desktop Entry Spec

Patrice Dumas pertusus at free.fr
Thu Apr 17 12:20:23 PDT 2008


On Fri, Apr 18, 2008 at 02:59:12AM +0800, 洪任諭 wrote:
> > Then those desktop environments should add support to xdg-utils for
> >  their environment and send patches.  As you say, there are many more,
> >  and the numbers are growing -- we can't expect the xdg-utils maintainers
> >  to track all of these things.
> I don't think this is a good idea... We already have too much
> duplicated work like this.
> This doesn't solve the problem from its root, and also it make things
> much more complicated.

In fedora there is a patch to use mimeopen -n. mimeopen is a perl script
that does what the desktop specific setups do.

I attach the patch (I hope that it has been submitted upstream).

--
Pat
-------------- next part --------------
diff -up xdg-utils-1.0.2/scripts/xdg-open.mimeopen xdg-utils-1.0.2/scripts/xdg-open
--- xdg-utils-1.0.2/scripts/xdg-open.mimeopen	2007-06-24 14:58:01.000000000 -0500
+++ xdg-utils-1.0.2/scripts/xdg-open	2008-01-18 08:49:50.000000000 -0600
@@ -360,6 +360,13 @@ open_xfce()
 
 open_generic()
 {
+    if mimeopen -v 2>/dev/null 1>&2; then
+        mimeopen -n "$1"
+        if [ $? -eq 0 ]; then
+            exit_success
+        fi
+    fi
+
     IFS=":"
     for browser in $BROWSER; do
         if [ x"$browser" != x"" ]; then


More information about the xdg mailing list