Monday, January 09, 2006

lab 51 - plumbing from firefox


lab 51 - plumbing from firefox


I often want to copy and paste text from the firefox browser into my Acme session. Copy and paste isn't implemented for hosted Inferno. It could be implemented easily enough, but not in a general way for all hosted environments, and there might be more interesting ideas to explore especially when including plumber in the mix.

To solve my particular problem, getting text from the browser to Acme, I created a bookmarklet that opens a window on a URL that I serve from my Inferno session. The URL http://localhost/magic/plumb is a shell script that calls the plumb command to open the query string in Acme.

plumb -d edit -a action showdata 
 -a filename /httpd/plumb $"msg >[2=1]

I have a modified httpd that calls shell scripts and sets environment variables to the cgi data from the query string. In this case msg is a query parameter.

I install a plumb bookmarket (drag it to toolbar), then I can select text in Firefox, click on the plumb and the text pops up in Acme.

I also go the otherway by having a file /services/httpd/root/snarf.txt which I plumb to firefox by right-clicking http://localhost/snarf.txt in Acme.

I'll finish this off with a few other tricks for users running Inferno on Windows. The winstart/winplumb scripts from Plan 9 work for Inferno too. These allow you to plumb messages from Inferno to Plan 9 and have the Windows shell launch programs. I've included both in the files for this lab. See the 9fans archives for more info. I've also included my current plumbing rules that use winstart. But basically, the windows shell usually knows what program handles a file or URL. So just calling winstart will open the URL in your default browser. Or winstart file.pdf will open Acrobat reader, for example. The plumbing rules for files local to the inferno namespace then need to be mapped to the Host namespace, which I talk about in an earlier lab.



Rebecca A. Maynard said...

the boiler drain install. Imagine if you needed to hurry and had got it cross-threaded with all the force of the water pushing it around.plumber

Robert said...

I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information.
more info

Unknown said...

Basically there are three types of plumbing courses that you could enroll into Online Plumbing Courses These types of courses can be applied over the internet. Plombier Vaudreuil

Robert said...

I appreciated your work very thanks news

Unknown said...

There always seems to be several plumbers in most towns and cities given that all properties have inside plumbing which needs attention at one time or another. Plombier Urgence Granby

lizza kim said...

It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge.

albina N muro said...

Obtaining a plumbing service contractor may be simple, but hiring a plumbing specialist is not really an easy thing to do. To prevent yourself from making the most common errors of picking a poor plumbing service company, you might want to take into consideration a few things gasfiter.

Eliza said...

Plumbing emergencies can happen any time and without any sort of warning. Plombier Verdun

Sarah Jacb said...

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing i thought about this

George said...

Our plumbing company offers plumbers certified and experienced in this field. Each of our plumbers has a certificate CMMTQ and RBQ , which guarantees that they are up to offer you a quality work. Plombier Ch√Ęteauguay Urgence

Best Plumber Calgary said...

Nice post. Thanks for sharing! Emergency Plumber Calgary

seo master said...

Thanks for the blog post buddy! Keep them coming... Hydro Jet Drain Cleaning Eastvale