1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
--- xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-utils-common.in
+++ xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-utils-common.in
@@ -282,6 +282,7 @@
       elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
       elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
       elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
+      elif which mimeo > /dev/null; then DE=mimeo;
       fi
     fi
 
--- xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-open.in
+++ xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-open.in
@@ -189,6 +189,17 @@
     if [ -n $scheme ]; then
         filetype="x-scheme-handler/$scheme"
         open_generic_xdg_mime "$1" "$filetype"
+    fi
+}
+
+open_mimeo()
+{
+    DEBUG 1 "Running mimeo \"$1\""
+    mimeo "$1"
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
     fi
 }
 
@@ -347,6 +358,10 @@
     open_lxde "$url"
     ;;
 
+    mimeo)
+    open_mimeo "$url"
+    ;;
+
     generic)
     open_generic "$url"
     ;;

--- xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-email.in
+++ xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-email.in
@@ -175,6 +175,18 @@
 {
     DEBUG 1 "Running exo-open \"$1\""
     exo-open "$1"
+
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+}
+
+open_mimeo()
+{
+    DEBUG 1 "Running mimeo \"$1\""
+    mimeo "$1"
 
     if [ $? -eq 0 ]; then
         exit_success
@@ -401,6 +413,10 @@
     open_xfce "${mailto}"
     ;;
 
+    mimeo)
+    open_mimeo "${mailto}"
+    ;;
+
     generic|lxde)
     open_generic "${mailto}"
     ;;

--- xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-mime.in
+++ xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-mime.in
@@ -84,6 +84,16 @@
        info_generic "$1"
     fi
 
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+}
+
+info_mimeo()
+{
+    mimeo -m "$1"
     if [ $? -eq 0 ]; then
         exit_success
     else
@@ -551,6 +561,10 @@
         info_gnome "$filename"
         ;;
 
+        mimeo)
+        info_mimeo "$filename"
+        ;;
+
         *)
         info_generic "$filename"
         ;;

--- xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-settings.in
+++ xdg-utils-050333e34e2fe7430ad2ead37e5a0420ac0c2a3e/scripts/xdg-settings.in
@@ -451,6 +451,42 @@
 }
 
 # }}} xfce
+# {{{ mimeo
+
+get_browser_mimeo()
+{
+    DEBUG 1 "Running mimeo -c 'http:'"
+    mimeo -d http: | sed -rn '2s/  ([^ ]+) +.*/\1/p'
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+}
+
+check_browser_mimeo()
+{
+    browser=`get_browser_mimeo $1`
+    if [ x"$browser" != x"$1" ]; then
+        echo no
+        exit_success
+    fi
+    echo yes
+    exit_success
+}
+
+set_browser_mimeo()
+{
+    DEBUG 1 "Running mimeo --prefer x-scheme-handler/http \"$1\""
+    mimeo --prefer x-scheme-handler/http \"$1\"
+    if [ $? -eq 0 ]; then
+        exit_success
+    else
+        exit_failure_operation_failed
+    fi
+}
+
+# }}} mimeo
 # }}} default browser
 
 # {{{ default url scheme handler
@@ -738,7 +774,7 @@
 detectDE
 
 case "$DE" in
-    kde|gnome*|xfce)
+    kde|gnome*|xfce|mimeo)
     dispatch_specific "$@"
     ;;