Dear xdg-utils developers,
<br> <br>In the interest of maximizing the usefulness of "xdg-open" for any popular desktop environment that exists for Linux, would it be politically feasible to adapt the official code for the next version of "/usr/bin/xdg-open" so that it can work properly for the Mate Desktop Environment?
<br> <br>After performing a review of the (very readable) source code of "xdg-open" in Linux Mint 13 Mate, I believe that only 3 functions would be affected:
<br> <br>1) main/implicit (final code): addition, after "gnome)":
<br>case "$DE" in
<br>...
<br>    mate)
<br>    open_mate "$url"
<br>...
<br> <br>2) detectDE: addition, after the 3rd line of that function:
<br>detectDE()
<br>{
<br>    ...
<br>    elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate;
<br>    elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.mate.SessionManager > /dev/null 2>&1` ; then DE=mate;
<br>...
<br>}
<br> <br>As you can see, the code is similar to the Gnome detection. The rationale for the small differences is the following set of tests on Linux Mint 13 Mate:
<br>$ printenv GNOME_DESKTOP_SESSION_ID
<br>$ printenv MATE_DESKTOP_SESSION_ID
<br>this-is-deprecated
<br>$ dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager
<br>Error org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.gnome.SessionManager': no such name
<br>$ dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.mate.SessionManager
<br>method return sender=org.freedesktop.DBus -> dest=:1.238 reply_serial=2
<br>   string ":1.0"
<br> <br>3) open_mate: creation [with code very similar to open_gnome()]
<br>open_mate()
<br>{
<br>    if gvfs-open --help 2>/dev/null 1>&2; then
<br>        gvfs-open "$1" #strangely, this wasn't forked (at least yet). All the other gvfs-* programs were forked.
<br>    else
<br>        mate-open "$1" #a fork of gnome-open
<br>    fi
<br> <br>    if [ $? -eq 0 ]; then
<br>        exit_success
<br>    else
<br>        exit_failure_operation_failed
<br>    fi
<br>}
<br> <br>Rationale:
<br>"mate-open" is a fork of "gnome-open".
<br>Many "gvfs-*" program were forked, but strangely, Mate hasn't forked "gvfs-open" (at least yet):
<br>$ gvfs-
<br>gvfs-cat            gvfs-mkdir          gvfs-rename
<br>gvfs-copy           gvfs-monitor-dir    gvfs-rm
<br>gvfs-info           gvfs-monitor-file   gvfs-save
<br>gvfs-less           gvfs-mount          gvfs-set-attribute
<br>gvfs-ls             gvfs-move           gvfs-trash
<br>gvfs-mime           gvfs-open           gvfs-tree
<br>$ matevfs-
<br>matevfs-cat      matevfs-info     matevfs-monitor  
<br>matevfs-copy     matevfs-ls       matevfs-mv       
<br>matevfs-df       matevfs-mkdir    matevfs-rm  
<br> <br>Regards,
<br> <br>Antonielly Garcia Rodrigues
<br>Software engineer @ Brazil<br>