Sending HTML to konqueror from the command line (via a named pipe)

Randy Kramer rhkramer at gmail.com
Mon Nov 27 01:13:42 GMT 2006


On Sunday 26 November 2006 03:19 pm, Rene Horn wrote:
> nc + konqi definitely works for streaming html.  It's not elegant, but
> it works.  I basically used the following commands to do it:
>
> $ mkfifo foo.html
> $ nc -lp 8081 -c "/bin/cat foo.html"  # Of course, the port doesn't
> need to be 8081--that was just the first number I came up with.
> $ konqueror http://localhost:8081 & # This command was done in a
> different terminal, of course.
> $ echo "<HTML><HEAD></HEAD><BODY>TEST</BODY></HTML>" > foo.html

Wonderful--thank you!

Randy Kramer

>
> And that's pretty much it.  I even put the entire thing into a loop
> just for fun:
>
> $ i=1; while true; do nc -lp 8081 -c "/bin/cat foo.html &"; echo
> "<HTML><HEAD></HEAD><BODY>TEST</BODY></HTML>" > foo.html; echo $i;
> i=`expr $i + 1`; done

;-)




More information about the kfm-devel mailing list