Friday, January 18, 2013

Associating myth:// URI scheme with mythavtest

This shows how to associate URI scheme myth:// with mythavtest in Ubuntu 12.04.

Create the desktop file.

sudo nano /usr/share/applications/mythhandler.desktop
Insert the following text in to the desktop file.
[Desktop Entry]
Encoding=UTF-8
Name=Myth protocol handler
Comment=MythTV protocol handler
Exec=/usr/bin/mythavtest %U
Terminal=false
Type=Application
Icon=MythTV
Categories=Application;Utility;Video;
MimeType=video/mpeg;x-scheme-handler/myth;
StartupNotify=true
StartupWMClass=MythTV
Save the file and issue the following command:
sudo update-desktop-database
Now you could run the following command to view a MythTV recording:
xdg-open myth://Default@192.168.1.5:6544/1323_20130118070000.mpg
Or in a node-webkit app you could do this:
var gui = require('nw.gui');
gui.Shell.openExternal("myth://Default@192.168.1.5:6544/1323_20130118070000.mpg");
I use this method in my MythTV Gadget.
Post a Comment