Re: [OT] making Firefox respect telnet:// URLs

2007-11-13 Thread Darren Spruell
On Nov 12, 2007 7:21 PM, Linus Swdlas <[EMAIL PROTECTED]> wrote: > On Mon, 12 Nov 2007 18:25:57 +0100, William Boshuck > <[EMAIL PROTECTED]> wrote: > > > On Mon, Nov 12, 2007 at 02:02:32AM +0100, Linus Swdlas wrote: > >> On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote: > > >> f

Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread Linus Swälas
On Mon, 12 Nov 2007 18:25:57 +0100, William Boshuck <[EMAIL PROTECTED]> wrote: On Mon, Nov 12, 2007 at 02:02:32AM +0100, Linus Swdlas wrote: On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote: feel free to correct me. =) This kind of parameter substitution is in the POSIX

Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread William Boshuck
On Mon, Nov 12, 2007 at 02:02:32AM +0100, Linus Swdlas wrote: > On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote: > > The ${var##string} part is ksh or bash specific, see "Parameter Expansion" > in the bash man page if you're using bash. > I see your #! line says /bin/sh but to

Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread Linus Swälas
On Mon, 12 Nov 2007 02:24:37 +0100, Ingo Schwarze <[EMAIL PROTECTED]> wrote: Your sh-kludge cited above is even worse; please DO try surfing to telnet://localhost:1234&xmessage:bad:guys:got:in And with my kludge it'd work with an url such as: telnet://host:port&touch /tmp/test or, if you us

Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread n0g0013
On 12.11-02:24, Ingo Schwarze wrote: [ ... ] > On a side note, do not use > exec "xmessage $url: parse error"; > or surfing to > telnet://localhost:1234&halt# > might yield surprising results. > > Your sh-kludge cited above is even worse; please DO try surfing to > telnet://localhost:1234&xm

Re: [OT] making Firefox respect telnet:// URLs

2007-11-12 Thread n0g0013
On 11.11-22:32, ropers wrote: [ ... ] > So far, I have created a script .telnet4firefox.sh in my home folder, > made that executable (chmod u+x), and in Firefox' about:config I have > added a new boolean network.protocol-handler.external.telnet (set to > true) and a new string network.protocol-hand

Re: [OT] making Firefox respect telnet:// URLs

2007-11-11 Thread Ingo Schwarze
> #!/bin/sh > xterm -e "telnet `echo ${*##telnet://} | sed 's/:/ /g'`" [...] > - I *think* the {} bit is awk(1), No, "/bin/sh" is not awk(1), but sh(1). =;c) [...] > If awk(1) can remove telnet:// from $* (if present), > then surely it should be able to turn a colon (if present) > into a space,

Re: [OT] making Firefox respect telnet:// URLs

2007-11-11 Thread Linus Swälas
On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote: xterm -e "telnet `echo ${1##telnet://}|sed -e 's/:/ /'`" ... My .telnet4firefox.sh file now is: #!/bin/sh xterm -e "telnet `echo ${*##telnet://} | sed 's/:/ /g'`" ... - I understand the backtick quoted execution.

Re: [OT] making Firefox respect telnet:// URLs

2007-11-11 Thread ropers
On 11/11/2007, Barry Miller <[EMAIL PROTECTED]> wrote: > On Sun, Nov 11, 2007 at 10:32:05PM +0100, ropers wrote: > > xterm -e "telnet ${1##telnet://}" > > > > When I click a telnet URL that does not specify a port, it works, > > xterm launches with telnet, which duly connects to the port. > > > > H

Re: [OT] making Firefox respect telnet:// URLs

2007-11-11 Thread Barry Miller
On Sun, Nov 11, 2007 at 10:32:05PM +0100, ropers wrote: > xterm -e "telnet ${1##telnet://}" > > When I click a telnet URL that does not specify a port, it works, > xterm launches with telnet, which duly connects to the port. > > However, if I click a telnet URL that *does* specify a port, it does

[OT] making Firefox respect telnet:// URLs

2007-11-11 Thread ropers
This is only tangentially OpenBSD-related, but probably a no-brainer for most of you who have a basic understanding of awk(1), so I'm hoping I can pick your brains: Now please bear with me, I'll get to the awk problem soon: I want to make Firefox respect telnet URLs, ie. if I click on a URL such a