Can I setup an xdg URL Scheme for Actionaz?

Post here if you need help using Actiona
Post Reply
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Can I setup an xdg URL Scheme for Actionaz?

Post by eureka »

I have Actionaz 3.8.0 installed on Ubuntu 14.04.
I am experimenting with launching Actionaz (and target script) but not from the usual workflow ...
Desktop > Applications > Accessories > actionaz ...

Instead I'm trying to launch from xdg-open links in a web browser page.

This requires a URL scheme and protocol handler to be defined for launching actionaz.

i.e. I need to write an xdg-open URL Handler for actionaz scheme.

I have other apps working using xdg-open from command line and browser but just cannot get Actionaz to launch.

Here is what I've done so far ...

[1] Written these two files ...

actionaz-handler.desktop in /usr/share/applications/

Code: Select all

[Desktop Entry]
Name=Actionaz URL Handler
GenericName=Automation Tool
Comment=Handle URL Scheme actionaz://
Exec=/home/dl/bin/actionaz-handler.sh %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/actionaz;
Icon=actionaz
Categories=Utility
actionaz-handler.sh in /home/dl/bin/

Note: In above .desktop file use your own username to home folder ... /home/yourusername/

Code: Select all

#!/bin/bash

# this file will later have additional lines
# to parse the url in the xdg-open browser link
# but for testing we just try to launch Actionaz with this single line

actionaz
[2] Make actionaz-handler.sh executable.

[3] Run command ...
xdg-mime default actionaz-handler.desktop x-scheme-handler/actionaz

[4] Run command ...
sudo update-desktop-database

[5] Run command to test xdg-mime setting
xdg-mime query default x-scheme-handler/actionaz

which should return ...
actionaz-handler.desktop

[6] Now ... try to launch Actionaz window through xdg-open link

Code: Select all

cd /usr/share/applications &&
xdg-open actionaz-handler.desktop
but instead of Actionaz window being launched a GEdit window is launched ...
with contents of actionaz-handler.desktop displayed.

What have I missed in this workflow in setting up Protocol Handler for Actionaz?
I can use this approach to launch other apps from xdg-open .. but not Activeaz.
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: Can I setup an xdg URL Scheme for Actionaz?

Post by eureka »

SOLVED .. when I run the URL ... actionaz://open .. in Chrome Web Browser
this pops up a window which asks permission for Protocol Handler to be accepted by user and then launches Activeaz.

Now I just need to devise an xdg-open URL which launches actionaz script(s) from browser links.

This URL will be parsed in actionaz-handler.sh to reconstruct a normal command line call to Actionaz
executed in handler.
Post Reply