urlopener_remote - weechat script to open urls on a remote host


this script can help you to open urls on a local host when running weechat remotely. however, such setup is not the most trivial. PLEASE READ:


it requires a three stage setup. on the weechat installation, just load the script as usual, i.e. by

  /perl load

on the local computer, you will need to set up an url opening daemon, which can be done quite easily if you have "netcat" (sometimes also called "nc") installed. in a terminal window, run

  while true; do xdg-open $(netcat -l -p 23337); done&

if you only have perl, things look a bit more awkward but something like this should do:

 perl -MSocket -E'socket my$s,PF_INET,SOCK_STREAM,getprotobyname"tcp";
          for(;accept my$c,$s;close$c)

now connect to your weechat on a remote server using the following command:

  ssh -R 23337:localhost:23337 -t YOUR.SSH.SERVER.ADDRESS

the important part here is to connect the ports using the -R switch. if you now click on a url using the "" script, it will get sent to the netcat above and opened with xdg-open (which is hopefully your favourite web browser)