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

Rene Horn the.rhorn at gmail.com
Sun Nov 26 20:19:07 GMT 2006


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

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

Rene

On 11/26/06, Kevin Krammer <kevin.krammer at gmx.at> wrote:
> On Sunday 26 November 2006 03:52, Randy Kramer wrote:
> > Thanks for the responses!  Some comments interspersed below:
> >
> > On Friday 24 November 2006 06:46 am, Kevin Krammer wrote:
>
> > > kfmclient exec foo.html text/html
> >
> > Did this work for you?  It didn't work for me.  I got the same sort of
> > "infinite loop" I got earlier--the "Open with" dialog comes up and asks me
> > what application I want to open the file (pipe) with, I choose konqueror,
> > and the dialog comes up again, ad infinitum.
>
> It worked in the sense that it directly opened konqueror, which then failed to
> load (the kio_file problem  Thiago mentioned)
>
> > > Maybe using netcat and one of KIO's "remote" protocols could be used
> > > instead
> >
> > I'll look for a netcat rpm for Mandriva2006, but any further hints would be
> > very welcome.
>
> Could be in some bigger networking tools package. The executable is often
> called "nc"
>
> Cheers
> Kevin
> --
> Kevin Krammer, KDE developer, xdg-utils developer
> KDE user support, developer mentoring
>
>
>


-- 
the.rhorn at gmail.com, rhorn at sdf.lonestar.org,
hornr18 at uwosh.edu (UW-Oshkosh email address),
http://rhorn.unixcab.org - a bunch of experimental stuff
SDF Public Access UNIX System - http://sdf.lonestar.org

Jay Leno in response to Colin Powell's deadline for an Iraqi
constitution:
"They can take ours.  After all, we aren't using it..."




More information about the kfm-devel mailing list