0

I really enjoy using MinitubeInstall Minitube. It's a very comfortable and lightweight alternative to YouTube playback with flash. The only thing that bothers me is that I have to manually copy and paste interesting youtube links I found into the program to play them back.

Is there any way I can automate this and integrate Minitube into Google Chrome or another web browser?

Glutanimate
  • 21,763

1 Answers1

1

Integrating Minitube with Chrome using a Chrome extension


Overview

Thanks to a Chrome extension by Nicu Farmache this is now possible. The extension source code may be checked out at the google code project page.

Installation

While trying to install the extension I found that the instructions provided by the author weren't working for me on Ubuntu 12.04.3 LTS. These are the steps I followed to get it to work anyway:

  1. Install the extension from the Chrome Webstore

  2. Create a script called minitubehandler.sh with the following content:

    #!/bin/bash
    # NAME:         minitubehandler.sh
    # VERSION:      
    # AUTHOR:       (c) 2013 Glutanimate
    # DESCRIPTION:  - parses youtube links coming from the Chrome minitube extension
    # FEATURES:     
    # DEPENDENCIES: minitube-ubuntu
    #
    # LICENSE:      GNU GPL v3
    #
    # USAGE:        Please follow the instructions provided in [this Q&A](http://askubuntu.com/a/353176/81372)
    
    MINITUBEURL="$1"
    ACTUALURL="${MINITUBEURL#minitube}"
    MINITUBE="/opt/minitube-ubuntu/minitube"
    
    "$MINITUBE" "$ACTUALURL" > /dev/null 2>&1&
    

    Please note that this will only work with the minitube-ubuntu package installed from the Ubuntu Software Center. In order to use the script with other version of minitube you will have to edit the path to the minitube executable.

  3. Either move the script to $PATH (e.g. ~/bin ) or move it to a folder of your choice and copy down the file path

  4. Create a new desktop file under ~/.local/share/applications called minitubehandler.desktop with the following contents:

    [Desktop Entry]
    Version=1.0
    Type=Application
    MimeType=x-scheme-handler/minitubehttp;x-scheme-handler/minitubehttps;
    Terminal=false
    Exec=minitubehandler.sh %u
    Name=minitubehandler
    Icon=minitube
    NoDisplay=true
    
  5. Make sure to replace the Exec line with the path to your script if you decided against moving it to your $PATH

  6. Assign the desktop file to the extension's MIME type by executing the following lines in a terminal:

    xdg-mime default minitubehandler.desktop x-scheme-handler/minitubehttp
    
    xdg-mime default minitubehandler.desktop x-scheme-handler/minitubehttps
    
  7. Restart Chrome

From now on if you navigate to a YouTube video page you should see a small Minitube icon on the right side of your address bar:

enter image description here

Clicking it will launch Minitube and play back the video or - if Minitube is already running - switch playback to the video in question:

enter image description here

Glutanimate
  • 21,763