Permalink
Browse files

Add MATE detection to the xdg-open script

  • Loading branch information...
1 parent 3359ccf commit db60a533154796f05ea83933a356aecd085b06be Ken Moore committed Nov 28, 2013
Showing with 18 additions and 3 deletions.
  1. +18 −3 src-sh/pc-extractoverlay/ports-overlay/usr/local/bin/xdg-open
@@ -313,6 +313,7 @@ detectDE()
#Now scan the running procs for DE-specific indicators
if [ -n "`echo "${UR_PROCS}" | grep startxfce`" ]; then DE=xfce;
elif [ -n "`echo "${UR_PROCS}" | grep gnome-session`" ]; then DE=gnome;
+ elif [ -n "`echo "${UR_PROCS}" | grep mate-session`" ]; then DE=mate;
elif [ -n "`echo "${UR_PROCS}" | grep lxsession`" ]; then DE=lxde;
elif [ -n "`echo "${UR_PROCS}" | grep kuiserver`" ]; then DE=kde;
#Otherwise use the classic methods for detection
@@ -355,9 +356,8 @@ first_word()
open_kde()
{
-
- if kioclient -v 2>/dev/null 1>&2; then
- kioclient exec "$1"
+ if kde-open -v 2>/dev/null 1>&2; then
+ kde-open "$1"
else
if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
kfmclient openURL "$1"
@@ -400,6 +400,17 @@ open_xfce()
fi
}
+open_mate()
+{
+ gvfs-open "$1"
+
+ if [ $? -eq 0 ]; then
+ exit_success
+ else
+ exit_failure_operation_failed
+ fi
+}
+
open_generic_xdg_mime()
{
filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"`
@@ -557,6 +568,10 @@ case "$DE" in
open_gnome "$url"
;;
+ mate)
+ open_mate "$url"
+ ;;
+
xfce)
open_xfce "$url"
;;

0 comments on commit db60a53

Please sign in to comment.