Re: Custom URL Schemata?

David Faure <[email protected]>
Newsgroups gmane.linux.xdg.devel
Organization KDE
Message-ID <20245962.FIp8HLyqzU@asterixp50>
On samedi 29 octobre 2016 09:30:58 CEST fREW Schmidt wrote:
> I don't really use a DE.  I figured out a solution myself if
> interested:
> https://blog.afoolishmanifesto.com/posts/custom-uri-schemata-on-linux/

Interesting patch for xdg-open in there (to support Terminal=true).

My own testing (after forcing xdg-open to call the open_generic function)
indicates that xdg-terminal fails when called with multiple arguments
so I had to modify your patch slightly, to say
   xdg-terminal "$command_exec $@"
instead of
   xdg-terminal "$command_exec" "$@"

Here's the patch, any objections against me committing it?

diff --git i/scripts/xdg-open.in w/scripts/xdg-open.in
index cb41ac6..62ef54b 100644
--- i/scripts/xdg-open.in
+++ w/scripts/xdg-open.in
@@ -282,7 +282,11 @@ search_desktop_file()
             args=$(( $args - 1 ))
         done
         [ $replaced -eq 1 ] || set -- "$@" "$target"
-        "$command_exec" "$@"
+        if [ "$(get_key "${file}" "Terminal")" = true ]; then
+           xdg-terminal "$command_exec $@"
+        else
+           "$command_exec" "$@"
+        fi
 
         if [ $? -eq 0 ]; then
             exit_success

-- 
David Faure, [email protected], http://www.davidfaure.fr
Working on KDE Frameworks 5

_______________________________________________
xdg mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/xdg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.