aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 4adeea6f3bdc4e44aeed87d4730b10ba6b55a245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
HearURL
=======

A URL launcher. The program listens over TCP and opens URLs it receives in a
local browser.

This makes it easy to open URLs from SSH sessions. When using programs like
Irssi and Mutt over SSH, a URL can be sent to HearURL to be opened
locally.


## Usage
Start HearURL in the background:

	$ nohup hearurl --browser Firefox > /tmp/hearurl.out 2>&1&

(Or use an init system like `systemd` or `launchd`.)

To use over SSH, set up remote forwarding to HearURL's local port (by default
set to `37705`):

	$ ssh -R 34254:localhost:37705 user@example.com

On the remote server, send a URL to `localhost:34254`, and it will open
locally.

A shell script ([`open_url.sh`][1]) is provided to simplify sending URLs over
the socket. Here's an example:

	$ ./open_url.sh https://duckduckgo.com/


## Install
**Note:** Only works for Mac OS X since the program delegates to
[`open`][2].

A binary built for Mac OS X is available on the [releases][3] page. Download the
binary and put it in your `PATH`.

To compile from source:

	$ cargo install --git https://github.com/teddywing/HearURL.git --root /usr/local


## Uninstall

	$ cargo uninstall --root /usr/local hearurl


## License
Copyright © 2017 Teddy Wing. Licensed under the GNU GPLv3+ (see the included
COPYING file).


[1]: ./open_url.sh
[2]: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/open.1.html
[3]: https://github.com/teddywing/HearURL/releases