1. Genggoro
  2. nmh-xsel

Overview

HTTPS SSH

A native messaging host (NMH) is a native application capable of communicating with Chrome apps/extensions. This repository includes an NMH to send X11's PRIMARY selection to registered Chrome apps/extensions (NMH-XSEL) and a program to install this NMH (installer).

If you are a Chrome app/extension developer interested in using this NMH for your project, take a look at example directory. This directory can be installed as Chrome packaged app. You can learn more about NMH here.

The following are instructions to use the installer.

Showing help messages

Run nmh-xsel with -h (or --help) option.

$ ./nmh-xsel -h

Each subcommand has its own help message.

$ ./nmh-xsel install -h

Installing NMH-XSEL

  1. Make sure that you have python3 installed on your system.

  2. Make sure that you have xsel installed on your system. If not, do it with:

    $ sudo apt-get xsel
    
  3. Clone this repository or download the latest tagged changeset.

    $ hg clone https://bitbucket.org/genggoro/nmh-xsel
    
  4. Open the extensions management page (chrome://extensions) with your browser and take a note of the ID of the app/extension to register as a "client" of NMH-XSEL.

  5. Run nmh-xsel install subcommand.

    # Install on the default Chrome profile.
    $ ./nmh-xsel install -i <ID>
    # The same as above using xsel:
    # After highlighting the ID...
    $ ./nmh-xsel install -i $(xsel)
    # Install on the default Chromium profile.
    $ ./nmh-xsel install -i <ID> -b chromium
    # Install on the non-default profile.
    $ ./nmh-xsel install -i <ID> -p <PATH>
    

Adding an ID to the installed NMH-XSEL

Run nmh-xsel add subcommand with -b and -p options as shown above.

$ ./nmh-xsel add <ID> [-b <BROWSER> -p <PROFILE>]

Removing an ID from the installed NMH-XSEL

Run nmh-xsel remove subcommand with -b and -p options as shown above.

$ ./nmh-xsel remove <ID> [-b <BROWSER> -p <PROFILE>]

Uninstalling NMH-XSEL

Run nmh-xsel uninstall subcommand with -b and -p options as shown above.

$ ./nmh-xsel uninstall [-b <BROWSER> -p <PROFILE>]

Updating the installed NMH-XSEL

Run nmh-xsel update subcommand with -b and -p options as shown above.

$ ./nmh-xsel update [-b <BROWSER> -p <PROFILE>]