Custom URL Schemata?
David Faure
faure at kde.org
Sat Oct 29 19:40:45 UTC 2016
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, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
More information about the xdg
mailing list