From 8f92659ca2cb51ecdb25d3339cafb767f8e8a911 Mon Sep 17 00:00:00 2001
From: Luis Guzman <ark@switnet.org>
Date: Thu, 20 Jan 2022 18:54:10 -0600
Subject: [PATCH] Fix kdeconnect mimetype issue.

---
 .../Fix_kdeconnect_open_MimeType.patch        | 26 ++++++++++++++++
 helpers/make-kdeconnect                       | 30 +++++++++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 helpers/DATA/kdeconnect/Fix_kdeconnect_open_MimeType.patch
 create mode 100644 helpers/make-kdeconnect

diff --git a/helpers/DATA/kdeconnect/Fix_kdeconnect_open_MimeType.patch b/helpers/DATA/kdeconnect/Fix_kdeconnect_open_MimeType.patch
new file mode 100644
index 000000000..923c4c547
--- /dev/null
+++ b/helpers/DATA/kdeconnect/Fix_kdeconnect_open_MimeType.patch
@@ -0,0 +1,26 @@
+From f1ce22124ce7dd630b8e909b4c50f90f035166d5 Mon Sep 17 00:00:00 2001
+From: Thomas Staudinger <staudi.kaos@gmail.com>
+Date: Sun, 4 Oct 2020 21:03:03 +0000
+Subject: [PATCH] Fix kdeconnect_open MimeType
+
+This changes the MimeType handler of the kdeconnect_open desktop file from an invalid "*/*" to the (hopefully) appropriate "application/octet-stream;" as discussed [here](https://bugs.launchpad.net/ubuntu/+source/kdeconnect/+bug/1878400)(including this solution), [here](https://github.com/clearlinux/distribution/issues/1906) and [here](https://bugs.archlinux.org/task/65865).
+---
+ data/org.kde.kdeconnect_open.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/data/org.kde.kdeconnect_open.desktop b/data/org.kde.kdeconnect_open.desktop
+index 0e0fb8ff..fce4da31 100644
+--- a/data/org.kde.kdeconnect_open.desktop
++++ b/data/org.kde.kdeconnect_open.desktop
+@@ -97,7 +97,7 @@ Comment[uk]=Відкрити на з'єднаному пристрої за до
+ Comment[x-test]=xxOpen on a connected device using KDE Connectxx
+ Comment[zh_CN]=通过 KDE Connect 在已连接的设备上打开
+ Comment[zh_TW]=使用 KDE 連線於連線裝置中開啟
+-MimeType=*/*;
++MimeType=application/octet-stream;
+ Exec=kdeconnect-handler --open %U
+ Icon=kdeconnect
+ Type=Service
+-- 
+GitLab
+
diff --git a/helpers/make-kdeconnect b/helpers/make-kdeconnect
new file mode 100644
index 000000000..ae181b61b
--- /dev/null
+++ b/helpers/make-kdeconnect
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022 Trisquel GNU/Linux developers
+#                       <trisquel-devel@listas.trisquel.info>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+VERSION=1
+
+. ./config
+
+#Apply patch Fix kdeconnect_open MimeType (f1ce2212)
+patch -p1 < $DATA/Fix_kdeconnect_open_MimeType.patch
+
+changelog "Fix kdeconnect_open MimeType"
+
+compile
-- 
GitLab